﻿// ==UserScript==
// @name         洛谷强化插件
// @namespace    洛谷强化插件
// @version      最终版
// @description  洛谷强化，来源自https://www.luogu.com.cn/blog/liutianyou/Luogu-Extra
// @author       版权共有
// @match        https://www.luogu.com.cn/*
// @grant        none
// @license      GPL-v3.0
// ==/UserScript==

//定义各域的入口
var mainForAll = function(){ //作用于https://www.luogu.com.cn/*
    //预加载Cookie和mdui & jquery
    if(window.localStorage.getItem("configed") == 1){
        window.background = window.localStorage.getItem("background").split(',');
        window.uid = window.localStorage.getItem("uid");
        window.nickname = window.localStorage.getItem("nickname");
        window.friends = window.localStorage.getItem("friends").split(',');
        window.discussLimit = window.localStorage.getItem("discussLimit");
        window.waifu = window.localStorage.getItem("waifu");
    }else{
        window.background = window.uid = window.nickname = window.friends = window.discussLimit = window.waifu = "";
    }
    if(typeof(mdui) == "undefined"){ //修复博客管理后台不能用的问题
        var mdui_css = document.createElement("link");
        mdui_css.rel = "stylesheet";
        mdui_css.href = "chrome-extension://bkomdjmeddfcjiaadecaolblfahccaok/mdui.min.css";
        document.getElementsByTagName("HEAD").item(0).appendChild(mdui_css);
        var mdui_js = document.createElement("script");
        mdui_js.src = "chrome-extension://bkomdjmeddfcjiaadecaolblfahccaok/mdui.min.js";
        document.getElementsByTagName("HEAD").item(0).appendChild(mdui_js);
    }
    if(typeof($) == "undefined"){ //修复验证码不能用的问题
        var jquery_js = document.createElement("script");
        jquery_js.src = "chrome-extension://bkomdjmeddfcjiaadecaolblfahccaok/jquery.min.js";
        document.getElementsByTagName("HEAD").item(0).appendChild(jquery_js);
    }
    var live2d = document.createElement("script");
    live2d.src = "chrome-extension://bkomdjmeddfcjiaadecaolblfahccaok/lib/L2Dwidget.min.js";
    document.getElementsByTagName("HEAD").item(0).appendChild(live2d);
    //***********************
    //Luogu Search AnyWhere 作者：tiger2005
    //代码来自于https://greasyfork.org/zh-CN/scripts/442416-luogu-search-anywhere/code
    //***********************
    setTimeout(function(){$(function(){
    Date.prototype.pattern = function(format) {
        var date = {
            "y+": this.getYear(),
            "M+": this.getMonth() + 1,
            "d+": this.getDate(),
            "h+": this.getHours(),
            "m+": this.getMinutes(),
            "s+": this.getSeconds(),
            "q+": Math.floor((this.getMonth() + 3) / 3),
            "S+": this.getMilliseconds()
        };
        if (/(y+)/i.test(format)) {
            format = format.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length));
        }
        for (var k in date) {
            if (new RegExp("(" + k + ")").test(format)) {
                format = format.replace(RegExp.$1, RegExp.$1.length == 1
                  ? date[k] : ("00" + date[k]).substr(("" + date[k]).length));
            }
        }
        return format;
    };
    var settings = localStorage.getItem("lsaw_settings");
    if(settings == undefined || settings == 'undefined')
        settings = {};
    else
        settings = JSON.parse(settings);
    var majorSettings = [
        ["lsawUserDisplay", true],
        ["lsawProblemDisplay", true],
        ["lsawOfficialListDisplay", false],
        ["lsawSelectListDisplay", false],
        ["lsawProblemDisplayNumber", 50],
        ["lsawListDisplayNumber", 50],
    ];
    for(var i=0; i<majorSettings.length; i++){
        var key = majorSettings[i][0], val = majorSettings[i][1];
        if(settings[key] == undefined || typeof(settings[key]) != typeof(val))
            settings[key] = val;
    }
    localStorage.setItem("lsaw_settings", JSON.stringify(settings));
    $("body").append(`
    <style>
        .searchAnywhere{
            position: fixed;
            top: 0px;
            left: 0px;
            height: 100%;
            width: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: 999;
            transition: 0.2s;
            color: white;
        }
        .searchAnywhereMain{
            height: min(600px, 100% - 10px);
            width: min(750px, 100% - 10px);
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
        }
        .inputArea{
            display: block;
            width: 100%;
            height: 48px;
            color: #aaa;
            position: relative;
            transition: 0.2s;
            margin-bottom: 10px;
        }
        .inputArea > input{
            border-radius: 5px;
            border: 2px solid #aaa;
            height: 48px;
            width: 100%;
            font-size: 18px;
            color: #aaa;
            padding: 14px 24px;
            outline: 0;
            background: transparent;
            box-sizing: border-box;
        }
        .inputArea.onHover > input, .inputArea.onFocus > input{
            border: 2px solid white;
        }
        .inputArea.onHover, .inputArea.onFocus, .inputArea.withContent{
            color: white !important;
        }
        .inputArea.onHover > input, .inputArea.onFocus > input, .inputArea.withContent > input{
            color: white !important;
        }
        .inputArea.withIconLeft > input{
            padding-left: 42px;
        }
        .inputArea.withIconRight > input{
            padding-right: 42px;
        }
        .inputArea > div.iconLeft{
            height: 48px;
            width: 48px;
            position: absolute;
            display: grid;
            place-items: center;
            top: 0px;
            left: 0px;
        }
        .inputArea > div.iconRight{
            height: 48px;
            width: 48px;
            position: absolute;
            display: grid;
            place-items: center;
            top: 0px;
            right: 0px;
        }
        .inputArea > div.iconLeft > svg{
            width: 20px !important;
            height: 20px !important;
        }
        .inputArea > div.iconRight > svg{
            width: 20px !important;
            height: 20px !important;
        }

        .inputAreaSmall{
            display: block;
            width: 100%;
            height: 30px;
            color: #aaa;
            position: relative;
            transition: 0.2s;
        }
        .inputAreaSmall > input{
            border-radius: 5px;
            border: 2px solid #aaa;
            height: 30px;
            width: 100%;
            font-size: 18px;
            color: #aaa;
            padding: 5px 10px;
            outline: 0;
            background: transparent;
            box-sizing: border-box;
        }
        .inputAreaSmall.onHover > input, .inputAreaSmall.onFocus > input{
            border: 2px solid white;
        }
        .inputAreaSmall.onHover, .inputAreaSmall.onFocus, .inputAreaSmall.withContent{
            color: white !important;
        }
        .inputAreaSmall.onHover > input, .inputAreaSmall.onFocus > input, .inputAreaSmall.withContent > input{
            color: white !important;
        }

        .userPurple{
            color: #cf5bff;
            font-weight: bold;
        }
        .userRed{
            color: #e74c3c;
            font-weight: bold;
        }
        .userOrange{
            color: #e67e22;
            font-weight: bold;
        }
        .userYellow{
            color: #d9a71d;
            font-weight: bold;
        }
        .userGreen{
            color: #5eb95e;
            font-weight: bold;
        }
        .userGray{
            color: #aaa;
            font-weight: bold;
        }
        .userCheater{
            color: #d3961c;
            font-weight: bold;
        }
        .userBlue{
            color: #07a2f1;
            font-weight: bold;
        }
        .userGold{
            color: #f1c40f;
            font-weight: bold;
        }
        .badgePurple{
            background-color: #cf5bff;
        }
        .badgeRed{
            background-color: #e74c3c;
        }
        .badgeOrange{
            background-color: #e67e22;
        }
        .badgeYellow{
            background-color: #d9a71d;
        }
        .badgeGreen{
            background-color: #5eb95e;
        }
        .badgeGray{
            background-color: #999;
        }
        .badgeCheater{
            background-color: #d3961c;
        }
        .badgeBlue{
            background-color: #07a2f1;
        }
        .badgeBlack{
            background-color: #0e1d69;
        }
        .badgeGold{
            background-color: #f1c40f;
        }
        .searchAnywhereContent{
            color: white;
            flex: 1;
            scrollbar-width: none;
            -ms-overflow-style: none;
            overflow-x: hidden;
            overflow-y: auto;
        }
        .searchAnywhereContent::-webkit-scrollbar { width: 0 !important; }
        .searchUserCard{
            background: #444;
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            cursor: pointer;
            color: white;
            padding: 10px;
            line-height: 1;
            margin-bottom: 10px;
            border: 2px solid #888;
            box-sizing: border-box;
        }
        .searchCard.light{
            border: 2px solid white;
        }
        .searchUserCard > div{
            width: 100%;
        }
        .searchUserCardBody{
            display: flex;
            flex-direction: row;
        }
        .searchUserCardImg{
            height: 36px;
            width: 36px;
            border-radius: 50%;
            margin-right: 10px;
        }
        .searchUserCardInfo > span:first-child{
            font-size: 14px;
            margin-bottom: 3px;
            display: inline-block;
            color: #bbb;
        }
        .searchUserCardInfo > span:last-child{
            font-size: 20px;
        }
        .searchUserCardMedia{
            display: flex;
            flex-direction: row;
        }
        .searchUserCardMedia > div{
            margin-top: 5px;
            flex: 1;
            display: inline-block;
            height: 23px;
            verticle-align: center;
        }
        .searchUserCardMedia > div > div{
            padding: 4px;
            position: relative;
            display: inline-block;
            background: #777;
            margin-right: 15px;
        }
        .searchUserCardMedia > div > div:after{
            width: 10px;
            height: 100%;
            content: "";
            border: 5px;
            position: absolute;
            top: 0px;
            left: 100%;
            clip-path: polygon(0 0,100% 50%,0 100%);
            background-color: inherit;
        }
        .userBadgeInfo{
            font-size: 14px;
            padding: 2px 5px;
            border-radius: 5px;
            color: white;
            font-weight: bold;
            margin: 0px 3px;
            display: inline-block;
        }
        .searchProblemCard{
            background: #444;
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            cursor: pointer;
            color: white;
            padding: 10px;
            line-height: 1;
            margin-bottom: 10px;
            border: 2px solid #888;
            box-sizing: border-box;
        }
        .searchProblemCard > div{
            width: 100%;
            display: flex;
            flex-direction: row;
        }
        .searchProblemCard > div:last-child{
            margin-top: 5px;
        }
        .searchProblemCardTag{
            margin-right: 12px;
            display: inline-flex;
            flex-direction: row;
            line-height: 24px;
            height: 24px;
            overflow: hidden;
        }
        .searchProblemCardTag > div{
            padding: 2px;
            position: relative;
            display: inline-block;
            margin-right: 5px;
        }
        .searchListCardTag{
            margin-right: 12px;
            display: inline-flex;
            flex-direction: row;
            line-height: 24px;
            height: 24px;
            overflow: hidden;
        }
        .searchListCardTag > div{
            padding: 2px;
            position: relative;
            display: inline-block;
            margin-right: 5px;
        }
        .searchListCardTag svg, .searchProblemCardTag svg{
            height: 20px !important;
            width: 20px !important;
        }
        .problemTagInfo{
            font-size: 16px;
            padding: 4px 7px;
            border-radius: 5px;
            color: white;
            display: inline-block;
        }
        .searchProblemCardBody > div:first-child{
            margin-right: 5px;
        }

        .searchListCard{
            background: #444;
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            cursor: pointer;
            color: white;
            padding: 10px;
            line-height: 1;
            margin-bottom: 10px;
            border: 2px solid #888;
            box-sizing: border-box;
            position: relative;
        }
        .searchListCard > div{
            width: 100%;
            display: flex;
            flex-direction: row;
        }
        .searchListCardBody > div:first-child{
            margin-right: 5px;
        }
        .searchListCardBody{
            margin-bottom: 5px;
        }

        .searchAnywhereSettings{
            position: fixed;
            top: 0px;
            left: 0px;
            height: 100%;
            width: 100%;
            background-color: rgba(0, 0, 0, 0.8);
            z-index: 1000;
            transition: 0.2s;
            color: white;
        }
        .searchAnywhereSettingsMain{
            height: min(300px, 100% - 10px);
            width: min(450px, 100% - 10px);
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
        }
        .searchAnywhereSettingsContent{
            flex: 1;
            scrollbar-width: none;
            -ms-overflow-style: none;
            overflow-x: hidden;
            overflow-y: auto;
        }
        .searchAnywhereSettingsBag{
            margin-bottom: 8px;
            user-select: none;
            font-size: 20px;
            position: relative;
            line-height: 30px;
        }
        .searchAnywhereClicky{
            position: relative;
            height: 30px;
            width: 30px;
        }
        .searchAnywhereClicky div{
             transition: 0.2s;
             position: absolute;
             top: 0px;
             left: 0px;
             cursor: pointer;
        }
        .searchAnywhereClicky div svg{
            height: 30px;
            width: 30px;
        }
        .searchAnywhereClicky[flag=false] .falseBlock{
            opacity: 1;
        }
        .searchAnywhereClicky[flag=true] .falseBlock{
            opacity: 0;
        }
        .searchAnywhereClicky[flag=true] .trueBlock{
            opacity: 1;
        }
        .searchAnywhereClicky[flag=false] .trueBlock{
            opacity: 0;
        }
        .searchAnywhereSettingsContent::-webkit-scrollbar { width: 0 !important; }
        .searchAnywhereCloseSettings{
            display: inline-grid;
            place-items: center;
            width: 32px;
            height: 32px;
            cursor: pointer;
            border-radius: 50%;
            background: white;
        }
        .searchAnywhereCloseSettings:hover{
            background: #aaa;
        }
        .searchAnywhereEntrance{/*
            z-index: 99;
            background: white;
            display: grid;
            place-items: center;
            width: 50px;
            height: 50px;
            position: fixed;
            right: 25px;
            bottom: 30px;
            transition: 0.2s;
            border-radius: 5px;
            cursor: pointer;
            top: 650px;
        */}
        .searchAnywhereEntrance:hover{
            background: #ccc;
        }
        .searchAnywhereEntrance svg{
            height: 30px;
            width: 30px;
        }
        .searchCard.light, .searchCard{
            color: white !important;
        }
        .searchAnywhereContent > div > div > a:hover{
            color: #83c4ef;
        }
    </style>
    <div class='searchAnywhere' style="opacity: 0; display: none;">
        <div class='searchAnywhereMain'>
            <div class='inputArea withIconLeft withIconRight searchAnywhereMainInput'>
                <input spellcheck="false" placeholder="Search AnyWhere"/>
                <div class="iconLeft"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="svg-inline--fa fa-search fa-w-24"><path data-v-1ad550c8="" data-v-303bbf52="" fill="currentColor" d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z" class=""></path></svg></div>
                <div class="iconRight"><svg style="cursor: pointer" class="searchAnywhereSettingsLink" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" aria-hidden="true" role="img"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"/></svg></div>
            </div>
            <div class='searchAnywhereContent'>
            </div>
        </div>
    </div>
    <div class='searchAnywhereSettings' style="opacity: 0; display: none;">
        <div class='searchAnywhereSettingsMain'>
            <div class="searchAnywhereSettingsContent">
                <div>
                    <div class="searchAnywhereSettingsBag" for="lsawUserDisplay">
                        显示用户
                        <div style="float: right" class="searchAnywhereClicky" flag="${settings.lsawUserDisplay}">
                            <div class="falseBlock">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"/></svg>
                            </div>
                            <div class="trueBlock">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM339.8 211.8C350.7 200.9 350.7 183.1 339.8 172.2C328.9 161.3 311.1 161.3 300.2 172.2L192 280.4L147.8 236.2C136.9 225.3 119.1 225.3 108.2 236.2C97.27 247.1 97.27 264.9 108.2 275.8L172.2 339.8C183.1 350.7 200.9 350.7 211.8 339.8L339.8 211.8z"/></svg>
                            </div>
                        </div>
                    </div>
                    <div class="searchAnywhereSettingsBag" for="lsawProblemDisplay">
                        显示题目
                        <div style="float: right" class="searchAnywhereClicky" flag="${settings.lsawProblemDisplay}">
                            <div class="falseBlock">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"/></svg>
                            </div>
                            <div class="trueBlock">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM339.8 211.8C350.7 200.9 350.7 183.1 339.8 172.2C328.9 161.3 311.1 161.3 300.2 172.2L192 280.4L147.8 236.2C136.9 225.3 119.1 225.3 108.2 236.2C97.27 247.1 97.27 264.9 108.2 275.8L172.2 339.8C183.1 350.7 200.9 350.7 211.8 339.8L339.8 211.8z"/></svg>
                            </div>
                        </div>
                    </div>
                    <div class="searchAnywhereSettingsBag" for="lsawOfficialListDisplay">
                        显示官方题单
                        <div style="float: right" class="searchAnywhereClicky" flag="${settings.lsawOfficialListDisplay}">
                            <div class="falseBlock">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"/></svg>
                            </div>
                            <div class="trueBlock">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM339.8 211.8C350.7 200.9 350.7 183.1 339.8 172.2C328.9 161.3 311.1 161.3 300.2 172.2L192 280.4L147.8 236.2C136.9 225.3 119.1 225.3 108.2 236.2C97.27 247.1 97.27 264.9 108.2 275.8L172.2 339.8C183.1 350.7 200.9 350.7 211.8 339.8L339.8 211.8z"/></svg>
                            </div>
                        </div>
                    </div>
                    <div class="searchAnywhereSettingsBag" for="lsawSelectListDisplay">
                        显示用户题单
                        <div style="float: right" class="searchAnywhereClicky" flag="${settings.lsawSelectListDisplay}">
                            <div class="falseBlock">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM384 80H64C55.16 80 48 87.16 48 96V416C48 424.8 55.16 432 64 432H384C392.8 432 400 424.8 400 416V96C400 87.16 392.8 80 384 80z"/></svg>
                            </div>
                            <div class="trueBlock">
                                <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M384 32C419.3 32 448 60.65 448 96V416C448 451.3 419.3 480 384 480H64C28.65 480 0 451.3 0 416V96C0 60.65 28.65 32 64 32H384zM339.8 211.8C350.7 200.9 350.7 183.1 339.8 172.2C328.9 161.3 311.1 161.3 300.2 172.2L192 280.4L147.8 236.2C136.9 225.3 119.1 225.3 108.2 236.2C97.27 247.1 97.27 264.9 108.2 275.8L172.2 339.8C183.1 350.7 200.9 350.7 211.8 339.8L339.8 211.8z"/></svg>
                            </div>
                        </div>
                    </div>
                    <div class="searchAnywhereSettingsBag" for="lsawProblemDisplayNumber">
                        题目展示数量
                        <div style="float: right; width: 150px">
                            <div class="inputAreaSmall withContent">
                                <input type="number" min="1" max="50" value="${settings.lsawProblemDisplayNumber}" class="withContent"/>
                            </div>
                        </div>
                    </div>
                    <div class="searchAnywhereSettingsBag" for="lsawListDisplayNumber">
                        题单展示数量
                        <div style="float: right; width: 150px">
                            <div class="inputAreaSmall withContent">
                                <input type="number" min="1" max="50" value="${settings.lsawListDisplayNumber}" class="withContent"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div style="margin-top: 10px; text-align: center; width: 100%;">
                <div class="searchAnywhereCloseSettings">
                    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512" class="icon svg-inline--fa fa-times fa-w-11" data-v-303bbf52="" style="transform: scale(1.2); width: 16px; height: 16px; color: rgb(231, 76, 60);"><path data-v-1b44b3e6="" fill="currentColor" d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" class=""></path></svg>
                </div>
            </div>
        </div>
    </div>
    <button class="mdui-fab mdui-fab-fixed mdui-ripple searchAnywhereEntrance" style="background-color: white; top: 550px">
        <i class="mdui-icon material-icons">search</i>
    </button>`);
    $(".inputArea > input").focus(function(){
        $(this).parent().addClass("onFocus");
    });
    $(".inputArea > input").blur(function(){
        $(this).parent().removeClass("onFocus");
        if($(this).val().length != 0)
            $(this).parent().addClass("withContent");
        else
            $(this).parent().removeClass("withContent");
    });
    $(".inputArea").mouseenter(function(){
        $(this).addClass("onHover");
    });
    $(".inputArea").mouseleave(function(){
        $(this).removeClass("onHover");
    });
    $(".inputAreaSmall > input").focus(function(){
        $(this).parent().addClass("onFocus");
    });
    $(".inputAreaSmall > input").blur(function(){
        $(this).parent().removeClass("onFocus");
        if($(this).val().length != 0)
            $(this).parent().addClass("withContent");
        else
            $(this).parent().removeClass("withContent");
    });
    $(".inputAreaSmall").mouseenter(function(){
        $(this).addClass("onHover");
    });
    $(".inputAreaSmall").mouseleave(function(){
        $(this).removeClass("onHover");
    });
    $(".searchAnywhereClicky").click(function(){
        var a = $(this).attr("flag");
        if(a == "false"){
            a = true;
            $(this).attr("flag", a);
        }
        else{
            a = false;
            $(this).attr("flag", a);
        }
        var settingsName = $(this).parent().attr("for");
        settings[settingsName] = a;
        localStorage.setItem("lsaw_settings", JSON.stringify(settings));
    })
    $(".inputAreaSmall input").change(function(){
        var a = Number($(this).val());
        var settingsName = $(this).parent().parent().parent().attr("for");
        settings[settingsName] = a;
        localStorage.setItem("lsaw_settings", JSON.stringify(settings));
    })
    $(".searchAnywhereCloseSettings").click(function(){
        $(".searchAnywhereSettings").css("opacity", "0");
        setTimeout(() => {
            $(".searchAnywhereSettings").css("display", "none");
        }, 200);
    })
    $(".searchAnywhereSettingsLink").click(function(){
        $(".searchAnywhereSettings").css("display", "block");
        setTimeout(() => {
            $(".searchAnywhereSettings").css("opacity", "1");
        }, 20);
    })

    const getColorFromPercent = (x, opa) => {
        let r = 0, g = 0, b = 0;
        let rr = 231, gg = 76, bb = 60;
        let rrr = 82, ggg = 196, bbb = 26;
        // if(x < 0.5){
        //  r = 255;
        //  g = one * x;
        // }
        // else{
        //  r = 255 - ((x - 0.5) * one);
        //  g = 255;
        // }
        r = rr + (rrr - rr) * x;
        g = gg + (ggg - gg) * x;
        b = bb + (bbb - bb) * x;
        r += (60 - r) * (1 - opa);
        g += (60 - g) * (1 - opa);
        b += (60 - b) * (1 - opa);
        r = Math.floor(r);
        g = Math.floor(g);
        b = Math.floor(b);
        return `rgb(${r}, ${g}, ${b})`;
    };

    const problemColors = [ "Gray", "Red", "Orange", "Yellow", "Green", "Blue", "Purple", "Black" ];
    const problemNames = [ "暂无评定", "入门", "普及-", "普及/提高-", "普及+/提高", "提高+/省选-", "省选/NOI-", "NOI/NOI+/CTSC" ];
    var searchTimeout = null;
    var currentHoverCard = undefined;
    const changeHoverCard = (x, scroll = true, align = false) => {
        $(".searchCard.light").removeClass("light");
        if(x != undefined && scroll)
            $(".searchAnywhereMainInput > input").blur();
        if(x != undefined){
            x.addClass("light").focus(align);
            if(scroll){
                var heg = x[0].offsetTop;
                var prr = x.parent().parent();
                var scr = prr.scrollTop();
                var r = heg - x.outerHeight() + 5, l = r - prr.outerHeight() + x.outerHeight() + 10;
                scr = Math.max(l, Math.min(r, scr));
                prr.scrollTop(scr);
            }
        }
        if(scroll){ // remove mouse event
            $(".searchCard").unbind('mouseenter').unbind('mouseleave');
            $(document).mousemove(() => {
                $(document).unbind('mousemove');
                $(".searchCard").unbind('mouseenter').unbind('mouseleave').hover(function(){
                    changeHoverCard($(this), false);
                }, function(){
                    changeHoverCard(undefined, false);
                });
            })
        }
        currentHoverCard = x;
    }
    const searchInfo = () => {
        searchTimeout = null;
        var info = $(".inputArea > input").val();
        info = $.trim(info);
        if(info == ""){
            $(".searchAnywhereContent").html("");
            return;
        }
        $(".searchAnywhereContent").html(`<div><div style='text-align: center; margin-bottom: 10px; width: 100%; font-size: 20px;'>加载中……</div></div>`);
        $(".searchAnywhereContent > div").unbind('click').click((event) => {
            event.stopPropagation();
        })
        var userHtml = "";
        var problemHtml = "";
        var officialHtml = "";
        var selectHtml = "";
        var finishWorks = 0;
        var networkError = false;
        var workCnt = (settings.lsawUserDisplay != false)
                    + (settings.lsawProblemDisplay != false)
                    + (settings.lsawOfficialListDisplay != false)
                    + (settings.lsawSelectListDisplay != false);
        const finishWork = () => {
            ++ finishWorks;
            if(finishWorks == workCnt){
                if(networkError)
                    $(".searchAnywhereContent").html(`<div><div style='text-align: center; margin-bottom: 10px; width: 100%; font-size: 20px;'>网络错误</div></div>`);
                else if(userHtml == "" && problemHtml == "" && officialHtml == "" && selectHtml == "")
                    $(".searchAnywhereContent").html(`<div><div style='text-align: center; margin-bottom: 10px; width: 100%; font-size: 20px;'>未搜索到相关内容</div></div>`);
                else{
                    changeHoverCard(undefined, false);
                    $(".searchAnywhereContent").html(`<div>` + userHtml + problemHtml + officialHtml + selectHtml + `</div>`);
                    $(".searchAnywhereContent > div").unbind('click').click((event) => {
                        event.stopPropagation();
                    })
                    $(".searchCard").unbind('mouseenter').unbind("mouseleave").hover(function(){
                        changeHoverCard($(this), false);
                    }, function(){
                        changeHoverCard(undefined, false);
                    });
                }
            }
        };
        const getProblemStatus = (x, y) => {
            if(!x && !y)
                return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="icon svg-inline--fa fa-minus fa-w-14" data-v-303bbf52="" style="width: 16px; height: 16px; color: #aaa"><path data-v-1b44b3e6="" fill="currentColor" d="M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z" class=""></path></svg>`;
            if(!y)
                return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352 512" class="icon svg-inline--fa fa-times fa-w-11" data-v-303bbf52="" style="transform: scale(1.2); width: 16px; height: 16px; color: rgb(231, 76, 60);"><path data-v-1b44b3e6="" fill="currentColor" d="M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" class=""></path></svg>`;
            return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon svg-inline--fa fa-check fa-w-16" data-v-303bbf52="" style="width: 16px; height: 16px; color: rgb(82, 196, 26);"><path data-v-1b44b3e6="" fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" class=""></path></svg>`;
        }
        const getCCFLevel = (x) => {
            if(x == null || x < 3)
                return "";
            var color = "";
            if(x <= 5)
                color = "#5eb95e";
            else if(x <= 7)
                color = "#07a2f1";
            else
                color = "#f1c40f";
            return `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" style="margin: 0px 3px;" fill="${color}" style="margin-bottom: -3px;"><path d="M16 8C16 6.84375 15.25 5.84375 14.1875 5.4375C14.6562 4.4375 14.4688 3.1875 13.6562 2.34375C12.8125 1.53125 11.5625 1.34375 10.5625 1.8125C10.1562 0.75 9.15625 0 8 0C6.8125 0 5.8125 0.75 5.40625 1.8125C4.40625 1.34375 3.15625 1.53125 2.34375 2.34375C1.5 3.1875 1.3125 4.4375 1.78125 5.4375C0.71875 5.84375 0 6.84375 0 8C0 9.1875 0.71875 10.1875 1.78125 10.5938C1.3125 11.5938 1.5 12.8438 2.34375 13.6562C3.15625 14.5 4.40625 14.6875 5.40625 14.2188C5.8125 15.2812 6.8125 16 8 16C9.15625 16 10.1562 15.2812 10.5625 14.2188C11.5938 14.6875 12.8125 14.5 13.6562 13.6562C14.4688 12.8438 14.6562 11.5938 14.1875 10.5938C15.25 10.1875 16 9.1875 16 8ZM11.4688 6.625L7.375 10.6875C7.21875 10.8438 7 10.8125 6.875 10.6875L4.5 8.3125C4.375 8.1875 4.375 7.96875 4.5 7.8125L5.3125 7C5.46875 6.875 5.6875 6.875 5.8125 7.03125L7.125 8.34375L10.1562 5.34375C10.3125 5.1875 10.5312 5.1875 10.6562 5.34375L11.4688 6.15625C11.5938 6.28125 11.5938 6.5 11.4688 6.625Z"></path></svg>`
        }
        if(settings.lsawUserDisplay != false)
        $.ajax({
            url: `/api/user/search?keyword=${info}`,
            type: 'GET',
            success: function(json){
                json = json.users;
                if(json.length != 0 && json[0] != null){
                    userHtml = `
                        <div style='text-align: left; margin-bottom: 10px; width: 100%; font-size: 18px; font-weight: bold'>用户</div>
                    `;
                    json.forEach((item) => {
                        if(item == null)
                            return;
                        if(item.color == "Cheater")
                            item.badge = "作弊者";
                        userHtml += `
                            <a class="searchCard searchUserCard" href='https://www.luogu.com.cn/user/${item.uid}'>
                            <div class="searchUserCardBody">
                                <div class="searchUserCardImg" style="background: url(https://cdn.luogu.com.cn/upload/usericon/${item.uid}.png); background-size: 36px 36px;"></div>
                                <div class="searchUserCardInfo"><span>UID ${item.uid}</span><br/><div style='display: flex; flex-direction: row'><span class="user${item.color}" style="line-height: 20px">${item.name}</span>${getCCFLevel(item.ccfLevel)}${item.badge != null && item.badge != "" ? `<div class='userBadgeInfo badge${item.color}'>${item.badge}</div>` : ""}</div></div>
                            </div>
                        </a>`
                    });
                }
                finishWork();
            },
            error: () => {
                networkError = true;
                finishWork();
            }
        });
        if(settings.lsawProblemDisplay != false)
        $.ajax({
            url: `/problem/list`,
            type: 'GET',
            headers: {"x-luogu-type": "content-only"},
            data: {
                keyword: info,
                page: 1,
                type: "P|B|CF|SP|AT|UVA"
            },
            success: function(json){
                if(json.code != 200){
                    finishWork();
                    return;
                }
                json = json.currentData.problems;
                if(json.count != 0){
                    problemHtml = `
                        <div style='text-align: left; margin-bottom: 10px; width: 100%; font-size: 18px; font-weight: bold'>题目<a href="/problem/list?keyword=${info}&page=1&type=P%7CB%7CCF%7CSP%7CAT%7CUVA" style="cursor: pointer; float: right; font-weight: normal !important" class="searchShowProblems">查看所有 ${json.count} 道题目</a></div>
                    `;
                    for(var i=0; i<json.result.length && i<settings.lsawProblemDisplayNumber; i++){
                        let item = json.result[i];
                        problemHtml += `
                         <a class="searchCard searchProblemCard" href='/problem/${item.pid}'>
                            <div class="searchProblemCardBody">
                                <div>${getProblemStatus(item.submitted, item.accepted)}</div>
                                <div>${item.title}</div>
                            </div>
                            <div>
                                <div class='searchProblemCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-book fa-w-14"><path data-v-639bc19b="" fill="currentColor" d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z" class=""></path></svg></div>${item.pid}</div>
                                <div class='searchProblemCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 544 512" class="svg-inline--fa fa-chart-pie fa-w-17"><path data-v-639bc19b="" fill="currentColor" d="M527.79 288H290.5l158.03 158.03c6.04 6.04 15.98 6.53 22.19.68 38.7-36.46 65.32-85.61 73.13-140.86 1.34-9.46-6.51-17.85-16.06-17.85zm-15.83-64.8C503.72 103.74 408.26 8.28 288.8.04 279.68-.59 272 7.1 272 16.24V240h223.77c9.14 0 16.82-7.68 16.19-16.8zM224 288V50.71c0-9.55-8.39-17.4-17.84-16.06C86.99 51.49-4.1 155.6.14 280.37 4.5 408.51 114.83 513.59 243.03 511.98c50.4-.63 96.97-16.87 135.26-44.03 7.9-5.6 8.42-17.23 1.57-24.08L224 288z" class=""></path></svg></div>${item.totalSubmit}</div>
                                <div class='searchProblemCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon svg-inline--fa fa-check fa-w-16" data-v-303bbf52="" style="width: 16px; height: 16px; color: rgb(82, 196, 26);"><path data-v-1b44b3e6="" fill="currentColor" d="M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" class=""></path></svg></div>${item.totalAccepted}</div>
                                <div style='flex: 1; text-align: right'>
                                    <div class="problemTagInfo badge${problemColors[item.difficulty]}">${problemNames[item.difficulty]}</div>
                                </div>
                            </div>
                        </a>`;
                    };
                }
                finishWork();
            },
            error: () => {
                networkError = true;
                finishWork();
            }
        });
        if(settings.lsawOfficialListDisplay != false)
        $.ajax({
            url: `/training/list`,
            type: "GET",
            data: {
                keyword: info,
                page: 1,
                type: "official"
            },
            headers: {"x-luogu-type": "content-only"},
            success: (json) => {
                if(json.code != 200){
                    finishWork();
                    return;
                }
                json = json.currentData;
                if(json.trainings.result.length != 0){
                    officialHtml = `<div style='text-align: left; margin-bottom: 10px; width: 100%; font-size: 18px; font-weight: bold'>官方题单<a href="/training/list?keyword=${info}&page=1&type=official" style="cursor: pointer; float: right; font-weight: normal !important" class="searchShowProblems">查看所有 ${json.trainings.count} 份题单</a></div>`;
                    for(var i=0; i<json.trainings.result.length && i<settings.lsawListDisplayNumber; i++){
                        var item = json.trainings.result[i];
                        var acs = json.acceptedCounts[item.id];
                        if(acs == undefined)
                            acs = 0;
                        officialHtml += `
                         <a class="searchCard searchListCard" href='/training/${item.id}' style="background: ${getColorFromPercent(acs / item.problemCount, 0.4)} !important">
                            <div class="searchListCardProgress" style="height: 5px; position: absolute; top: -1px; left: 0px; overflow: hidden; border-top-left-radius: 5px; border-top-right-radius: 5px">
                                <div style="width: ${acs / item.problemCount * 100}%; background: ${getColorFromPercent(acs / item.problemCount, 1)}; height: 5px; content: ""></div>
                                <div style="flex: 1"></div>
                            </div>
                            <div class="searchListCardBody">
                                <div>#${item.id}</div>
                                <div>${item.title}</div>
                            </div>
                            <div>
                                <div class='searchListCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-book fa-w-14"><path data-v-639bc19b="" fill="currentColor" d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z" class=""></path></svg></div>${acs} / ${item.problemCount}</div>
                                <div class='searchListCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="#f1c40f" d="M381.2 150.3L524.9 171.5C536.8 173.2 546.8 181.6 550.6 193.1C554.4 204.7 551.3 217.3 542.7 225.9L438.5 328.1L463.1 474.7C465.1 486.7 460.2 498.9 450.2 506C440.3 513.1 427.2 514 416.5 508.3L288.1 439.8L159.8 508.3C149 514 135.9 513.1 126 506C116.1 498.9 111.1 486.7 113.2 474.7L137.8 328.1L33.58 225.9C24.97 217.3 21.91 204.7 25.69 193.1C29.46 181.6 39.43 173.2 51.42 171.5L195 150.3L259.4 17.97C264.7 6.954 275.9-.0391 288.1-.0391C300.4-.0391 311.6 6.954 316.9 17.97L381.2 150.3z"/></svg></div>${item.markCount}</div>
                            </div>
                        </a>`;
                    }
                }
                finishWork();
            },
            error: () => {
                networkError = true;
                finishWork();
            }
        })
        if(settings.lsawSelectListDisplay != false)
        $.ajax({
            url: `/training/list`,
            type: "GET",
            data: {
                keyword: info,
                page: 1,
                type: "select"
            },
            headers: {"x-luogu-type": "content-only"},
            success: (json) => {
                if(json.code != 200){
                    finishWork();
                    return;
                }
                json = json.currentData;
                if(json.trainings.result.length != 0){
                    selectHtml = `<div style='text-align: left; margin-bottom: 10px; width: 100%; font-size: 18px; font-weight: bold'>用户题单<a href="/training/list?keyword=${info}&page=1&type=select" style="cursor: pointer; float: right; font-weight: normal !important" class="searchShowProblems">查看所有 ${json.trainings.count} 份题单</a></div>`;
                    for(var i=0; i<json.trainings.result.length && i<settings.lsawListDisplayNumber; i++){
                        var item = json.trainings.result[i];
                        if(item.provider.color == "Cheater")
                            item.provider.badge = "作弊者";
                        selectHtml += `
                         <a class="searchCard searchListCard" href='/training/${item.id}'>
                            <div class="searchListCardBody">
                                <div>#${item.id}</div>
                                <div>${item.title}</div>
                            </div>
                            <div>
                                <div class='searchListCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-book fa-w-14"><path data-v-639bc19b="" fill="currentColor" d="M448 360V24c0-13.3-10.7-24-24-24H96C43 0 0 43 0 96v320c0 53 43 96 96 96h328c13.3 0 24-10.7 24-24v-16c0-7.5-3.5-14.3-8.9-18.7-4.2-15.4-4.2-59.3 0-74.7 5.4-4.3 8.9-11.1 8.9-18.6zM128 134c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm0 64c0-3.3 2.7-6 6-6h212c3.3 0 6 2.7 6 6v20c0 3.3-2.7 6-6 6H134c-3.3 0-6-2.7-6-6v-20zm253.4 250H96c-17.7 0-32-14.3-32-32 0-17.6 14.4-32 32-32h285.4c-1.9 17.1-1.9 46.9 0 64z" class=""></path></svg></div>${item.problemCount}</div>
                                <div class='searchListCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="currentColor" d="M256 512C114.6 512 0 397.4 0 256C0 114.6 114.6 0 256 0C397.4 0 512 114.6 512 256C512 397.4 397.4 512 256 512zM232 256C232 264 236 271.5 242.7 275.1L338.7 339.1C349.7 347.3 364.6 344.3 371.1 333.3C379.3 322.3 376.3 307.4 365.3 300L280 243.2V120C280 106.7 269.3 96 255.1 96C242.7 96 231.1 106.7 231.1 120L232 256z"/></svg></div>${(new Date(item.createTime * 1000)).pattern("yyyy/MM/dd")}</div>
                                <div class='searchListCardTag'><div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--! Font Awesome Pro 6.1.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="#f1c40f" d="M381.2 150.3L524.9 171.5C536.8 173.2 546.8 181.6 550.6 193.1C554.4 204.7 551.3 217.3 542.7 225.9L438.5 328.1L463.1 474.7C465.1 486.7 460.2 498.9 450.2 506C440.3 513.1 427.2 514 416.5 508.3L288.1 439.8L159.8 508.3C149 514 135.9 513.1 126 506C116.1 498.9 111.1 486.7 113.2 474.7L137.8 328.1L33.58 225.9C24.97 217.3 21.91 204.7 25.69 193.1C29.46 181.6 39.43 173.2 51.42 171.5L195 150.3L259.4 17.97C264.7 6.954 275.9-.0391 288.1-.0391C300.4-.0391 311.6 6.954 316.9 17.97L381.2 150.3z"/></svg></div>${item.markCount}</div>
                                <div style='flex: 1; text-align: right'>
                                    <object style='display: inline-block'><a href="/user/${item.provider.uid}">
                                        <div style='display: flex; flex-direction: row'>
                                            <span class="user${item.provider.color}" style="line-height: 20px">${item.provider.name}</span>
                                            ${getCCFLevel(item.provider.ccfLevel)}
                                            ${item.provider.badge != null && item.provider.badge != "" ? `<div class='userBadgeInfo badge${item.provider.color}'>${item.provider.badge}</div>` : ""}
                                        </div>
                                    </a></object>
                                </div>
                            </div>
                        </a>`;
                    }
                }
                finishWork();
            },
            error: () => {
                networkError = true;
                finishWork();
            }
        })
    };
    $(".searchAnywhereMainInput > input").unbind('input propertychange').on('input propertychange', function(){
        if(searchTimeout != null)
            clearTimeout(searchTimeout);
        searchTimeout = setTimeout(searchInfo, 1000);
    });
    let searchAnywhereOpen = false;
    $(".searchAnywhereEntrance").unbind('click').click(function(){
        if(! searchAnywhereOpen){
            $(".searchAnywhere").css("display", "block");
            setTimeout(() => {
                $(".searchAnywhere").css("opacity", "1");
                $(".searchAnywhereMainInput > input").focus();
            }, 20);
        }
        else{
            $(".searchAnywhere").css("opacity", "0");
            setTimeout(() => {
                $(".searchAnywhere").css("display", "none");
            }, 200);
        }
        searchAnywhereOpen = !searchAnywhereOpen;
    });
    $(".searchAnywhere").unbind('click').click(() => {
        $(".searchAnywhere").css("opacity", "0");
        setTimeout(() => {
            $(".searchAnywhere").css("display", "none");
        }, 200);
        searchAnywhereOpen = false;
    })
    $(".searchAnywhereMainInput").unbind('click').click((event) => {
        event.stopPropagation();
    })
    $(document).keydown(function(event){
        if((event.keyCode == 186)
            && (event.ctrlKey || event.metaKey)){
            if(! searchAnywhereOpen){
                $(".searchAnywhere").css("display", "block");
                setTimeout(() => {
                    $(".searchAnywhere").css("opacity", "1");
                    $(".searchAnywhereMainInput > input").focus();
                }, 20);
            }
            else{
                $(".searchAnywhere").css("opacity", "0");
                setTimeout(() => {
                    $(".searchAnywhere").css("display", "none");
                }, 200);
            }
            searchAnywhereOpen = !searchAnywhereOpen;
            event.preventDefault();
        }
        if(searchAnywhereOpen){
            if(event.keyCode == 38){ // Up
                if(currentHoverCard == undefined){
                    var lis = $(".searchCard");
                    if(lis.length == 0)
                         $(".searchAnywhereMainInput > input").focus();
                    else{
                        currentHoverCard = lis.eq(lis.length - 1);
                        changeHoverCard(currentHoverCard);
                    }
                }
                else{
                    currentHoverCard = currentHoverCard.prev();
                    while(1){
                        if(currentHoverCard.length == 0 || currentHoverCard.hasClass("searchCard"))
                            break;
                        currentHoverCard = currentHoverCard.prev();
                    }
                    if(currentHoverCard.length == 0){
                        $(".searchAnywhereMainInput > input").focus();
                        currentHoverCard = undefined;
                    }
                    changeHoverCard(currentHoverCard);
                }
                event.preventDefault();
            }
            else if(event.keyCode == 40){ // Down
                if(currentHoverCard == undefined){
                    var lis = $(".searchCard");
                    if(lis.length == 0)
                         $(".searchAnywhereMainInput > input").focus();
                    else{
                        currentHoverCard = lis.eq(0);
                        changeHoverCard(currentHoverCard);
                    }
                }
                else{
                    currentHoverCard = currentHoverCard.next();
                    while(1){
                        if(currentHoverCard.length == 0 || currentHoverCard.hasClass("searchCard"))
                            break;
                        currentHoverCard = currentHoverCard.next();
                    }
                    if(currentHoverCard.length == 0){
                        $(".searchAnywhereMainInput > input").focus();
                        currentHoverCard = undefined;
                    }
                    changeHoverCard(currentHoverCard);
                }
                event.preventDefault();
            }
            else if(event.keyCode == 13){ // Enter
                if(currentHoverCard != undefined)
                    window.open(currentHoverCard.attr("href"), "_blank");
                event.preventDefault();
            }
            else if(event.keyCode == 9)
                event.preventDefault();
            else
                $(".searchAnywhereMainInput > input").focus();
        }
    })
    });}, 500);
    //***********************
    //底部信息修改 作者：刘天佑
    //***********************
    var buttombar = document.querySelector('p[data-v-3e2ae97b]');
    var copyrightDialog = document.createElement("div");
    copyrightDialog.innerHTML = `
    <div class="mdui-dialog" id="copyright_dialog">
         <div class="mdui-dialog-title">洛谷强化插件版权信息</div>
         <div class="mdui-dialog-content">
             <div class="mdui-textfield mdui-textfield-floating-label">
                 洛谷强化插件 - <a href="https://opensource.org/licenses/GPL-3.0">GNU General Public License v3.0</a>
                 <pre sytle="font-family: monospace,monospace; font-size: 1em; display: block; padding: 1rem; margin: 1rem 0; line-height: 1.6; word-break: break-all; color: #555555; background-color: #f8f8f8; border: 1px solid #dedede; border-radius: 0;">
<code style="padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0;">
洛谷强化插件 使用<a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" href="https://opensource.org/licenses/GPL-3.0">GNU General Public License v3.0许可证</a>
版权共有 © 2022 <a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" href="https://www.luogu.com.cn/user/206814">LiuTianyou</a>&lt;<a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" href="mailto:1347277058@qq.com">1347277058@qq.com</a>&gt; & rainy & <a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" href="https://www.luogu.com.cn/user/49067">叶ID (KMnO4y_Fish, yezhiyi9670)</a> & <a data-v-303bbf52="" data-v-3e2ae97b="" target="_blank" colorscheme="default" class="color-default" href="https://www.luogu.com.cn/user/60864">tiger2005<a href="mailto:3478556308@qq.com">&lt;3478556308@qq.com&gt;</a> & <a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" href="https://www.luogu.com.cn/user/274993">Maxmilite<a href="mailto:yufe008@live.com" data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default">&lt;yufe008@live.com&gt;</a></a>

代码的其他部分根据各自的开源许可证发表。

本程序为自由软件，你可以依据GNU通用授权许可证的条款（自由软件基金会公布的第三版或者是你自己选择的其它后续版本），再分发和/或修改它。

该程序以具有实际用途为目的发布，但是并不包含任何担保，也不包含基于特定商用或健康用途的默认担保。具体细节请查看GNU通用授权许可证。

你在收到本程序的同时，也应当收到一份GNU通用公共授权许可证副本，如果没有，请查看<http://www.gnu.org/licenses/>。

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.

Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.

“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.

To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

A “covered work” means either the unmodified Program or a work based on the Program.

To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.

To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.

A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.

The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

The Corresponding Source for a work in source code form is that same work.

2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:

a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.

A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.

“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.

If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).

The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.

Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.

7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.

Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:

a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).

However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.

9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.

An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.

A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.

If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.

A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.

14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.

If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type 'show c' for details.
The hypothetical commands 'show w' and 'show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.

You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
            </code></pre>
             <a href="https://greasyfork.org/zh-CN/scripts/442416-luogu-search-anywhere/code">Luogu Search AnyWhere</a> - <a href="https://opensource.org/licenses/MIT">MIT License</a>
             <pre sytle="font-family: monospace,monospace; font-size: 1em; display: block; padding: 1rem; margin: 1rem 0; line-height: 1.6; word-break: break-all; color: #555555; background-color: #f8f8f8; border: 1px solid #dedede; border-radius: 0;">
<code style="padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0;">
<img src="https://cdn.luogu.com.cn/upload/image_hosting/h86yme8k.png">
The MIT License

Copyright © 2022 <a href="https://www.luogu.com.cn/user/60864">tiger2005<a href="mailto:3478556308@qq.com">&lt;3478556308@qq.com&gt;</a>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
             </code></pre>
             <a href="https://greasyfork.org/zh-CN/scripts/426868-luoguemojisender/code">Luogu Emoji Sender</a> - <a href="https://opensource.org/licenses/GPL-3.0">GNU General Public License v3.0</a>
             <pre sytle="font-family: monospace,monospace; font-size: 1em; display: block; padding: 1rem; margin: 1rem 0; line-height: 1.6; word-break: break-all; color: #555555; background-color: #f8f8f8; border: 1px solid #dedede; border-radius: 0;">
<code style="padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0;">
<img src="https://cdn.luogu.com.cn/upload/image_hosting/v8jf6mv5.png" width=680>
<a href="https://greasyfork.org/zh-CN/scripts/426868-luoguemojisender/code">Luogu Emoji Sender</a> 使用<a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" href="https://opensource.org/licenses/GPL-3.0">GNU General Public License v3.0许可证</a>
版权所有 © 2021 <a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" href="https://www.luogu.com.cn/user/274993">Maxmilite<a href="mailto:yufe008@live.com" data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default">&lt;yufe008@live.com&gt;</a></a>

本程序为自由软件，你可以依据GNU通用授权许可证的条款（自由软件基金会公布的第三版或者是你自己选择的其它后续版本），再分发和/或修改它。

该程序以具有实际用途为目的发布，但是并不包含任何担保，也不包含基于特定商用或健康用途的默认担保。具体细节请查看GNU通用授权许可证。

你在收到本程序的同时，也应当收到一份GNU通用公共授权许可证副本，如果没有，请查看<http://www.gnu.org/licenses/>。

GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright © 2007 Free Software Foundation, Inc. <https://fsf.org/>

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.

Preamble
The GNU General Public License is a free, copyleft license for software and other kinds of works.

The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things.

To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it.

For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions.

Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users.

Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free.

The precise terms and conditions for copying, distribution and modification follow.

TERMS AND CONDITIONS
0. Definitions.
“This License” refers to version 3 of the GNU General Public License.

“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks.

“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations.

To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work.

A “covered work” means either the unmodified Program or a work based on the Program.

To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well.

To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying.

An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion.

1. Source Code.
The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work.

A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language.

The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it.

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work.

The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source.

The Corresponding Source for a work in source code form is that same work.

2. Basic Permissions.
All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law.

You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you.

Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary.

3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures.

When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures.

4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program.

You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee.

5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions:

a) The work must carry prominent notices stating that you modified it, and giving a relevant date.
b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”.
c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so.
A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate.

6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways:

a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b.
d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d.
A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work.

A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product.

“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made.

If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).

The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network.

Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying.

7. Additional Terms.
“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions.

When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission.

Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms:

a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or authors of the material; or
e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors.
All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying.

If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms.

Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way.

8. Termination.
You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11).

However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation.

Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice.

Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10.

9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so.

10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License.

An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts.

You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it.

11. Patents.
A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”.

A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License.

Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version.

In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party.

If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid.

If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it.

A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007.

Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law.

12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program.

13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such.

14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation.

If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.

END OF TERMS AND CONDITIONS

How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.

To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type 'show c' for details.
The hypothetical commands 'show w' and 'show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”.

You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <https://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <https://www.gnu.org/licenses/why-not-lgpl.html>.
            </code></pre>
            <a href="https://greasyfork.org/zh-CN/scripts/390180-%E6%B4%9B%E8%B0%B7%E6%98%BE%E7%A4%BA%E4%BB%96%E4%BA%BA%E5%92%95%E5%80%BC">洛谷显示他人咕值</a> - 暂无许可证
             <pre sytle="font-family: monospace,monospace; font-size: 1em; display: block; padding: 1rem; margin: 1rem 0; line-height: 1.6; word-break: break-all; color: #555555; background-color: #f8f8f8; border: 1px solid #dedede; border-radius: 0;">
              <code style="padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0;">
<a href="https://greasyfork.org/zh-CN/scripts/390180-%E6%B4%9B%E8%B0%B7%E6%98%BE%E7%A4%BA%E4%BB%96%E4%BA%BA%E5%92%95%E5%80%BC">洛谷显示他人咕值</a> 暂无许可证
版权所有 © 2021 <a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" href="https://www.luogu.com.cn/user/274993">叶ID</a>

目前正在积极与原作者联系，以获取版权声明。
             </code></pre>
             <a href="https://greasyfork.org/zh-CN/scripts/390181-%E6%B4%9B%E8%B0%B7%E6%8C%89%E9%9A%BE%E5%BA%A6%E9%9A%8F%E6%9C%BA%E8%B7%B3%E9%A2%98/code">洛谷按难度随机跳题</a> - 暂无许可证
             <pre sytle="font-family: monospace,monospace; font-size: 1em; display: block; padding: 1rem; margin: 1rem 0; line-height: 1.6; word-break: break-all; color: #555555; background-color: #f8f8f8; border: 1px solid #dedede; border-radius: 0;">
              <code style="padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0;">
<a href="https://greasyfork.org/zh-CN/scripts/390181-%E6%B4%9B%E8%B0%B7%E6%8C%89%E9%9A%BE%E5%BA%A6%E9%9A%8F%E6%9C%BA%E8%B7%B3%E9%A2%98/code">洛谷按难度随机跳题</a>  暂无许可证
版权所有 © 2021 <a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" href="https://www.luogu.com.cn/user/274993">叶ID</a>

目前正在积极与原作者联系，以获取版权声明。
             </code></pre>
             <a href="https://greasyfork.org/zh-CN/scripts/392036-%E6%B4%9B%E8%B0%B7%E9%A2%98%E7%9B%AE%E9%9A%BE%E5%BA%A6%E6%98%BE%E7%A4%BA-luogu-dif-render/code">洛谷题目难度显示 luogu dif render</a>  - 暂无许可证
             <pre sytle="font-family: monospace,monospace; font-size: 1em; display: block; padding: 1rem; margin: 1rem 0; line-height: 1.6; word-break: break-all; color: #555555; background-color: #f8f8f8; border: 1px solid #dedede; border-radius: 0;">
              <code style="padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0;">
<a href="https://greasyfork.org/zh-CN/scripts/392036-%E6%B4%9B%E8%B0%B7%E9%A2%98%E7%9B%AE%E9%9A%BE%E5%BA%A6%E6%98%BE%E7%A4%BA-luogu-dif-render/code">洛谷题目难度显示 luogu dif render</a>  暂无许可证
版权所有 © 2021 rainy

目前正在积极与原作者联系，以获取版权声明。
             </code></pre>
             <a href="https://github.com/xiazeyu/live2d-widget.js">Live2D</a>  - <a href="https://spdx.org/licenses/AGPL-3.0-or-later.html">GNU Affero General Public License v3.0</a>
             <pre sytle="font-family: monospace,monospace; font-size: 1em; display: block; padding: 1rem; margin: 1rem 0; line-height: 1.6; word-break: break-all; color: #555555; background-color: #f8f8f8; border: 1px solid #dedede; border-radius: 0;">
              <code style="padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0;">
<a href="https://github.com/xiazeyu/live2d-widget.js">Live2D</a>  - <a href="https://spdx.org/licenses/AGPL-3.0-or-later.html">GNU Affero General Public License v3.0</a>
版权所有 © xiazeyu

GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 19 November 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.

  A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate.  Many developers of free software are heartened and
encouraged by the resulting cooperation.  However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.

  The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community.  It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server.  Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.

  An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals.  This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU Affero General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Remote Network Interaction; Use with the GNU General Public License.

  Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software.  This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time.  Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source.  For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code.  There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
             </code></pre>
            <a href="https://blog.csdn.net/wusuojiban/article/details/89108641">GNU General Public License v3.0 非官方中文译本（译者：徐顺）</a>
             <pre sytle="font-family: monospace,monospace; font-size: 1em; display: block; padding: 1rem; margin: 1rem 0; line-height: 1.6; word-break: break-all; color: #555555; background-color: #f8f8f8; border: 1px solid #dedede; border-radius: 0;">
              <code style="padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0;">
GNU通用公共授权许可证

2007年6月29日第三版

自由软件基金会公司，2007版权所有。<http://fsf.org/>

每个人都可以原样复制和呈现此授权许可证全文，但不允许修改。

序言

GNU通用公共授权许可证是一种可以免费使用的，针对软件和其它作品的“著佐权”许可证。

绝大多数的软件和实用作品的授权许可证，都被设计为不允许共享作品、修改作品。相较而言，GNU通用公共授权许可证意在保证您拥有共享和修改一个程序的全部版本的自由，使得软件面向所有用户均保持为自由软件。我们自由软件基金，在我们大多数软件中都使用GNU通用公共授权许可证，许可证同样可以适在希望按照这种方式发布的任何其它作品上。你也可以让你的软件使用本授权。

当我们谈及自由软件，我们指的是行动自由，而非价格免费。我们的通用公共授权许可证意在确保你拥有发行自由软件副本的自由（如果你愿意，也可以收费），确保你可以收到源代码，或者在你想要的时候能找到源代码，确保你可以修改相关软件或者将其一部分用于新的自由程序中，同时确保你知道你有权做上述事情。

为了保护你的权利，我们需要防止其他人否认你的这些权利，或者要求你放弃这些权利。因此，如果你发行相关软件副本，或者修改副本，你需要肩负起尊重他人自由的责任。

例如，如果你发行一个自由程序的副本，无论是免费的还是收费的，你必须将你从上游收到的自由，向下游传递下去。你必须确保他们也可以收到或者找到源代码。你必须向他们展示同样的授权条款，让他们知道他们的权利。

使用GNU通用公共授权许可证的开发者们，通过以下两个步骤保护你的权利：（1）在软件上声明拥有版权（2）给你提供本授权许可证，给你法律上的复制权、发行权与修改权。

为了对开发者和作者进行保护，本通用公共授权许可证明确说明如下：自由软件不含任何担保。无论是从使用者，还是从作者的利益角度出发，本通用公共授权许可证要求：如果对软进行了修改，则需要进行标注，以避免修改版软件中的问题会被错误地归咎到先前版本的作者身上。

有些设备被设计成拒绝用户在其上面安装或者运行修改版的软件，而将此权利保留给制造商（译者注：例如打印机）。这种情况与保护用户拥有自由修改软件的权利出现了根本性冲突。这种系统性大量滥用权利的情况，出现在了个人用户产品领域，这是最让人无法接受的。因此，我们设计了此版本的通用公共授权许可证来阻止这样的做法。如果这些问题在其它领域实质性出现，我们准备将在未来版本的通用公共授权许可证里，将条款延伸至这些相应领域，用来保护用户的自由。

最后，每个程序都持续地受到软件专利的威胁。政府不应当让专利限制通用计算机软件的发展和使用。但是，在那些允许专利限制的地方，我们希望可以避免这种因专利导致自由软件实质上被私有化的特殊威胁。为了防止此事，本通用公共授权许可证声明，专利不能够被用来将自由软件程序非自由化。

有关复制权、发行权和修改权的具体条款及适用条件如下。

条款及适用条件

0、定义

“本授权许可”指GNU通用公共授权许可证第三版。

“版权”亦至适用于其它作品种类的，类似版权法的法律，如半导体掩膜领域的版权保护法律。

“程序”指由本许可证授权的所有可获得版权的作品。被授权人称为“你”，“被授权人”和“接收人”可以是个人，也可以是组织。

“修改”一份作品指的是除了制作一份完全相同的副本之外，对作品整体或者一部分进行复制或改变。所产生的作品称为先前作品的“修改版”，或者是“基于”先前作品的作品。

“受保护作品”指未经修改的程序作品，或基于该程序作品的衍生作品。

“传播”作品指除了在计算机上运行或者修改一份自己持有副本情形外，任何可能使你直接或者间接承担版权法侵权责任的行为。传播行为包括复制、分发（无论是否修改），让公众共享，和在某些国家里的其它类似行为。

“传递”作品指任何能够使其他主体制作或获取副本的所有传播行为。仅仅通过计算机网络与用户交互，而没有传送副本，不属于传递。（译者注：此处属于“传播”但不属于“传递”的行为，指本人或者本组织内的传播，例如多台设备之间的安装或备份）

交互式用户界面中的“相关法律声明”应当以便利且显著的可视化的特征来展示，法律声明包括：（1）一份合适的版权说明，和（2）告诉用户：a.本作品不含担保（除非确实提供了担保）， b.本授权许可证持有人有权传递本作品，c.告诉用户如何查看本授权许可证的副本。如果交互式界面中有用户命令和选项列表，比如菜单，在列表中的一个显著栏目来展示法律声明，即符合规范。

1、源代码

作品“源代码”指对作品进行修改时最常用的代码表现形式。“目标代码”指作品的任何非源代码形式的代码。

“标准接口”指接口是由公认的标准组织来定义的符合官方标准的接口、或者是某种特定语言定义的众多接口中，由使用这种语言的开发者们广泛使用的接口。

可执行作品的“系统库”不是指作品本身，而是指（a）调用程序中的主要组件所使用的全部通常形式，不包括主要组件本身，和（b）用于使作品能和主要组件协同工作，或者用于使得公众在源代码形式上可用的标准接口。此处的“主要组件”指的是运行程序作品的特定操作系统（如有）的核心组件（内核、视窗系统等）、用来运行程序作品，或者生成程序的编译器、或者是运行目标代码的编译器。

以目标代码形式存在的作品，其“对应源代码”指所有生成、安装和运行（对可执行程序作品而言）目标代码程序、或修改程序作品所需要的全部源代码，也包括控制这些行为的脚本。然而，前述“对应源代码”并不包含作品的系统库，或者通用工具，或者那些用来实现前述行为的不属于作品一部分的、通常可以免费获得的、未经修改的其它程序。例如，对应源代码包括与作品源文件相关的接口定义文件，共享库的源代码和因程序特别设计需要而定义的动态链接子程序，因为有时，作品的其它部分和子程序需要频繁的数据交互或大量的数据流。

对应源代码不包括用户可以用对应源代码自动生成的任何内容。

本身以源代码形式存在的作品和目标代码作品是同一作品。

2、基本许可

本授权许可证授予的所有权利，在整个版权期限内均有效，并且在满足既定的要求时不可撤销。本许可证明确地授权你可以无限制地运行程序的原始版本。运行程序作品所得到的结果，只有在该结果的内容能够成为一个新作品的时候，才继续受本授权许可证管理。本授权许可承认你有合理使用（包括法律规定的其它类型的合理使用）的权利。

只要你的授权持续有效，你可以无条件地制作、运行和传播（不得传递）作品。在向第三方传递你不具有版权的作品时，必须按照本许可证的要求，只有在第三方单独只为你修改作品、或者提供运行设备的情况下，才能够传递给他。那些为你制作或者运行作品的第三方必须仅限于你的利益，在你的指示和控制下进行，并要禁止他们在超出和你的关系之外制作任何作品的复制件。

其它情况下的传递行为只有在满足以下章节的规定时才可为。转让授权许可证是不允许的，第十节的规定也让这种行为变得没有必要。

3、防止反规避立法（译者注：规避行为主要指破解行为，为便于理解，阅读时尝试直接将“规避”一词替换成“破解”）影响用户的合法权利

为履行1996年12月20日世界知识产权组织条约第11章规定的义务，法律规定有禁止、限制规避措施的条款，本授权许可证下的所有作品都不应当被视为采取了前述法律规定里指称的有效的反规避技术性措施。

当你传递一个（本许可证下的）受保护作品，即表明你放弃任何禁止技术规避措施法律所赋予的权利，行使本授权许可证授予的权利可以实现规避，同时，你放弃禁止技术规避措施相关法律赋予你的或者第三方的权利，不会针对作品的用户，限制其操作和修改作品。

4、传递原始（未经修改的）副本

如果满足：1、你显著地在每份副本里都附上恰当的版权声明；2、声明中，将“本许可证条款及添加的非许可条款（依照第7节）均适用于该代码”的内容保持完整；3、声明中，将“不含有任何担保”的内容保持完整；4、跟程序一起，给每一份接受者提供一份本授权许可证文本，则你可以通过各种媒体将程序未经修改的源代码进行传递。

你在传递时，可以就每一份副本收取任意费用，也可以免费提供，你也可以提供有偿的技术支持或担保。

5、传递修改后的源代码

如果你同时也能够满足下面的全部条件，你可以传递一个基于原程序的修改程序（以第四节规定的源代码的形式），或者是修改内容自身源代码。

a) 作品中必须明确声明被你修改过，并给出相关修改的日期。
b) 作品中必须明确声明：作品依据本授权许可证及本授权许可证第7节规定的其它补充条件发行。此处的要求修改了第四节“保持完整全部声明”的要求。
c) 你必须将全部作品作为一个整体，按照本授权许可证，授权给任何得到副本的人。无论作品怎样组织在一起，本授权许可证及按照本授权许可证第7节添加的条款均适用于全部作品。本授权许可证不允许对作品进行其它方式的授权许可，但是如果你分别收到这样的许可，本授权许可证亦不会致使其无效。
d) 如果作品有用户交互界面，每一类界面中都要显示恰当的法律声明，如果原程序的交互界面也没有显示，则你的作品不需要这么做。
本授权下的作品和其它与之分离的单独作品组成的一个汇编作品中，后者并非前者的自然延伸，与前者并未混合在一起，也未意图在某种存储或分发媒介上组成一个更大的程序，如果这种汇编作品及其版权限制，不影响单个作品的版权限制，则它被称为“软件集合包”，在“软件集合包”中含有本授权项下的作品，“软件集合包”中的其它软件作品不必适用本许可证。

6、传递非源代码形式的作品

在你依据本许可证第4节、第5节的规定，以目标代码的形式传递作品时，需要按照如下方式中的一种，传递机器可读的对应源代码。

a) 以物理方式（包括物理媒介）传递或嵌入目标代码时，同时将对应源代码植入通常用于软件交换的耐久性物理媒介上。
b) 以物理形式（包括物理发行媒介）传递或嵌入目标代码时，同时提供书面要约。要约有效期至少3年，有效期也应涵盖提供备用配件或者客户支持的周期，要约的内容是使得目标代码持有者（1）获得本许可证下全部作品对应源代码的副本，该副本应该记录在通常用于软件交换的耐久性物理媒介上，获取副本的成本需合理；或者（2）可从从网络服务器免费复制对应的源代码。
c) 单独传递一个目标代码副本时，提供一份书面要约副本。此种方式只有在偶然而且非商业的情况下才可以使用，且目标代码副本和要约副本需要同时传递，要约内容也必须满足上述第6节b)款要求。
d) 通过在指定位置提供权限的方式传递目标代码（收费或免费），并在相同的位置、以相同的方式提供获得对应源代码的同等权限（不可再次额外收费）。你不必要求接收方在复制目标代码的时候也一并复制源代码。如果是从一个网络服务器上复制目标代码，则你在目标代码旁清楚地标明对应源代码的可获取位置的情况下，对应源代码可以位于另一个不同的服务器上，该服务器应提供同等复制权限（由你或者其他第三方维护）。无论由哪个服务器存储对应源代码，你都有义务保证在有这种复制源代码的需求的时候，服务器能用。
e) 用点对点传输方式传递目标代码，你需要告知其它节点目标代码和对应的源代码的位置，并按照第6节d)款的要求向公众免费提供。
目标代码中可分离的部分，其源代码属于系统库，因而从对应源代码中分离出来，在传递中，不需要包含这部分。

用户产品是指（1）“消费者产品”，即任何通常用于个人、家庭或家居为目的的有形个人财产，或者（2）任何以嵌入住宅为目的而设计或者销售的产品。在决定一个产品是否为消费者产品时候，存疑的案例应当考虑扩大范围（尽量包含进来）。对于特定接收人所接受的特定产品而言，“一般用途”是指该类产品常用的或者普遍的用途，而与其特定的使用人自身情况、特定的使用人实际使用情况、或者期望、或者期望的使用方式无关。无论产品是否已实质性地具备了商业化用途、工业化用途或者非消费者用途，只要这类用途没有变成产品的唯一主要应用场景，此产品就应当是消费者产品。

用户产品的安装信息是指由修改过的源代码生成的，用来安装和执行修改版作品的任何方法、步骤、授权秘钥、或者其它信息。安装信息应当足以保证修改后的目标代码不会仅仅因为存在修改，而使其持续运行能力受到限制或者干扰。

如果你按照本节的规定传递一个目标代码作品到用户产品中、或者与用户产品一起、或者为了特别用于用户产品的目的，传递行为成为交易行为的一部分，使得用户产品的所有权和使用权永久性地或者一定期限内转移到接收者名下（无论此项交易的特点如何），按照本节规定，传递对应源代码时应当提供安装信息。但是这种要求，在无论是你还是第三方都不具备在用户产品中安装修改版目标代码的能力时，无需遵守（例如，把作品安装到ROM上）。

提供安装信息并不要求：针对接收者修改或安装的软件作品，或者针对安装了修改软件产品的硬件产品，提供持续性的服务支持、保证、或者升级。当修改版的软件作品严重危害到网络运行或者违反网络传输协议规则时，可以禁止其联网。

根据本节规定，传递的对应源代码、安装信息必须采用公共文档格式（要求在源代码的形式上，实现对公众可用），不能使用特殊的密码或秘钥来解压缩、阅读和复制。

7、补充条款

补充许可条款是指对本授权许可证里的一项或者多项适用条件规定例外情形，来补充本授权许可证。只要补充许可条款在法律上有效，能够适用于整个程序的补充条款，应当被看作本授权许可证的一部分。如果补充许可条款只适用于程序的一部分，此部分则单独适用补充许可条款，整个程序仍然适用本授权许可证而不用考虑补充许可条款。

当你传递一个作品的副本时，你可以自主选择从副本或者副本里的任何地方移除任何补充许可条款。（某些情况下，当你修改作品的时候，补充许可条款已经被写成要求将自身删除）对于那些你拥有或者可以授予合适版权的作品，你可以在作品的材料中添加补充许可条款。

尽管本授权许可证还有其它条款，然而针对你添加到授权作品里面的材料（如果得到了材料版权所有者的授权），你可使用以下类型的补充条款。

a) 以与本授权许可证第15节、第16节不同的方式，拒绝担保或者缩限责任；
b) 要求保留特定的、合理的法律声明，或者要求保留署名权（前述材料里已有的署名、或者作品里法律声明中的署名）；
c) 禁止对前述材料的来源进行错误陈述，若对相关材料进行修改，要求进行合理标注以示和原始版本存在不同；或
d) 限制对作者或者权利人的姓名进行公开使用；
e) 拒绝授权商号、商标或者服务标识的使用（商标法下）；
f) 当他人在传递作品（或者其修改版）时，若对接收者提供合同契约式的责任假设，则此人需要对授权人和作者承担赔偿责任，因为任何合同契约式的责任假设，都将造成这些授权人和作者直接承担责任。
所有其它类型的非许可性补充条款，都属于第10节中的“进一步限制”。如果你接收到的程序或者程序的一部分，含有一份由本授权许可证管理的声明，声明中又包含进一步限制的条款，你可以去除该进一步限制的条款。如果一份授权文书中包含进一步限制条款，但是容许根据本授权许可证进行具再授权和传递，你仍然可以选择适用此授权文书，并在受保护作品里面添加其它作品，只要此进一步限制条款针对再授权和传递行为不生效。

如果你根据本节在作品中添加条款，你必须在相关源代码文件内放置相关补充条款声明，或者一份指明哪里可以找到这些补充条款的提示。

补充条款，许可性的或者非许可性的，可以规定在单独的书面许可证里，也可以以例外陈述的形式存在，两种方式均符合要求。

8、终止

你不得传播或修改受保护作品，除非获得了本授权许可证的明确授权。所有传播或者修改受保护作品的尝试都是无效的，并会自动终止你根据本授权许可证取得的全部权利（包括根据第11节第三段授予的任何专利许可授权）。

然而，如果你停止了违反本授权许可证的行为，你从特定版权持有人处获得的授权许可就会得到临时性或永久性的恢复：（a）临时性恢复，除非并直到版权所有人明确并终局性地终止了你的授权（译者注：版权所有人明确并终局性地终止授权之前，你仍可临时性拥有授权），（b）永久性恢复，如果版权所有人没能在你停止违反行为之日后60日内以合理方式将违反情形通知你。

然而，如果版权所有人以合理的方式将违反本授权许可证的行为通知你，这是你第一次从版权所有人处接到违反本授权许可证的通知（无论针对哪个作品），如果你在收到通知后30天内修正了违反行为，你从特定版权所有人处获得的授权即得到永久性恢复。

按照本节的规定，终止你的权利，并不会让那些从你那里按照本授权许可协议取得副本和授权的其他人的授权许可证也随之终止。如果你的权利被终止了，并且没有得到永久性恢复，你并没有资格依据第10节的规定针对相同的作品获得新的授权许可证。

9、持有副本无需同意（本授权）

你仅仅接收、运行一个程序副本，不需要同意本授权许可证。使用点对点传输技术对原始文件进行的附带性传播并不需要同意本授权许可证。然而，只有本授权许可证准许你传播和修改受保护作品。如果你不同意本授权，前述行为就侵犯了著作权。因此，你修改和传播一个受保护作品，即表明你同意本授权许可证。

10、自动对下游接受者授权

你每次传递一个受保护作品，接收者都自动获得了来自原始许可人的授权许可，并可根据授权许可运行、修改或传播该作品。你对第三方是否遵守本授权许可证不承担责任。

“实体交易”是指一种转移组织控制权，或者全部财产权利，或者拆分组织，或者合并几个组织。如果传播作品是由一项实体交易产生的，每一个收到作品副本的交易参与者，将同样接收到来自其前任（已有的或者按照前述段落所述可以授予的）针对作品的全部授权文件，如果其前任可以合法拥有作品的对应源代码，或者通过合理限度的努力可以取得对应源代码，则参与者亦有权获取此对应源代码。

你不能对实施本授权许可证授予或者确认的权利，施加以任何进一步的限制。例如，你不能对实施本授权许可证所授予的的权利，强制收取许可证使用费、版权费或者其它费用，并且不能对制作、使用、销售、推销、引进整个程序或者部分程序的行为，以侵犯专利为由，发起诉讼程序（包括交叉诉讼和反诉）。

11、专利

“贡献者”指授予作品使用权的人、或者授予衍生作品版权的人。授权作品被称为贡献者的“贡献者版本”。

贡献者的“必要专利声明”涵盖了贡献者所享有的或者控制的全部专利（无论是已经获得或者即将获得的），本授权许可证允许的部分行为，如制作、使用、销售贡献者版本将对该“必要专利声明”构成侵权，但“对贡献者版本进行修改即构成侵权”不包括在声明内。根据该定义的目的，“控制”一词包括有权进行专利转授权。

每一个贡献都依据此“必要专利声明”，授予你非排他的，世界范围的、无版权费的专利授权许可，你有权制作、使用、销售、推销、引进以及运行、修改和传播贡献者版本。

在此后的三个段落中，“专利许可证”指任何不实施专利的明确协议或承诺，无论其名字如何（例如，使用专利权的明确许可、放弃就侵犯专利进行诉讼的明确协议）。“授权”专利许可证给一方，即表明达成一项不对专利强制进行要求的协议或承诺。

如果你“明知需要”专利许可证才能传递受保护作品，且作品的源代码尚未向公众开放，在按照本授权通过公共网络服务或者其它方式也不容易免费获取，你必须选择（1）开放对应源代码；或（2）放弃已享有的专利授权，或（3）按本授权的要求，将专利授权许可延伸到下游的接收者。“明知需要”指你明确地知道，在没有专利许可的情况下，在某些国家你传递一个受保护作品或者你的接收者使用此受保护作品，将会侵犯一项或者多项在该国明显存在的专利，而且你也有理由知道这些专利是有效的。

如果在一个单独的交易或者相关安排中，你传递或者传播（通过取得传递授权的方式）一个受保护作品，并授予部分接收方专利许可，授权他们使用、复制、修改或者传递某份受保护作品的一个特殊副本，那么你授权的专利许可，将自动延伸至此受保护作品或者衍生作品的所有接收方手中。

一项专利许可证如果不包含：禁止行使（专利权）或者有条件的禁止（针对）本授权许可证特别授予的一项或者多项权利（来行使专利权），则该专利许可证是“歧视性的”。如果你是软件商业发行协议中的一方，则你不得传递受保护作品，因为该商业发行协议规定你按照发行量向第三方支付价款，而第三方则向他人授予的是一份歧视性的专利许可，许可范围（a）限于你传递的副本（或者此副本的副本），或者（b）限于特殊产品或者含有受保护作品的软件集合包，除非你签订了此协议或者此种专利授权许可是在2007年3月28日之前作出的。

本授权许可证的全部条款，都不应当被理解成排除或者限制你适用专利权法律中的默认部分，或针对侵权采取防御措施。

12、保护他人的自由

如果现实情况与本授权许可证相冲突（无论是法院命令、协议或者其它），你不得以此为由豁免本授权许可证的义务。如果你不能一并同时履行本授权许可证项下的义务及其它相关义务，则不得传递相关受保护作品。例如，如果你承担某种合同义务，合同条款要求你向接收方再次传递作品的行为收取版权费用，唯一让你满足此条款义务和本授权许可证义务的做法只有完全停止传递该程序。

13、与GNU Affero通用公共许可证同时使用

尽管本授权许可证有众多条款，你可以将任何一个受保护作品和一个适用GNU Affero通用许可证的作品连接或者结合成一个合成作品，并传递该合成作品。本授权许可证条款将对所辖的作品这一部分继续有效，但是GNU Affero通用许可证里的特别要求，即第13节关于网络交互的部分将适用于整个合成作品。

14、本授权许可证的修改版本

自由软件基金会可能会不定期对GNU通用授权许可证进行修改或更新。新版本将在精神上与当前版本类似，但是可能细节之处有所不同，以期解决和关注新的问题。

每一个版本都有一个独立的版本号。如果程序作品标明适用一个特定版本的GNU通用公共授权许可证，同时也标明任何其他它续版本也同样适用，则你可以在适用的版本中自由选择，既可以适用标明特定版本号的版本，也可以选择由自由软件基金会之后发布的后续版本。如果程序没有特别标明版本号，则你可以选择适用任何一个由自由软件基金会发布的版本。

如果程序中标明程序的代理人可以决定适用未来的哪一个版本的GNU通用公共授权许可证，则代理人公开声明的版本，将永久性地授权给你使用。

后续版本可能有补充性的或者不同的许可，但是，你对后续版本的选择，并不会增加作者或者版权所有人的额外责任。

15、免担保声明

在相关法律的许可范围内，本程序不提供任何担保。除非有书面声明，版权所有者或其他提供程序的第三方，“概”不提供任何形式的担保，无论是明示的还是默认的，包括但不限于从商用和健康角度出发的的默认担保。程序的全部质量、性能风险由您承担。程序出现瑕疵时，你自行承担全部的服务、修理或修正费用。

16、责任限制

除非相关法律要求或者以书面形式达成一致，版权持有人或者依据前述规定修改或传递程序的其他人，不必为你因为使用或者不能使用本程序所造成的一般性、特殊性、意外性或者间接性损害承担责任（包括但不限于数据损失，数据执行不准确、你和第三方的损失及程序与其它程序不兼容的损失），即便版权持有人或者其他人已经提示过前述损失可能存在。

17、第15节和第16节的解释

如果前述拒绝担保和责任限制的条款不能被当地法律支持，受理法院应当以最接近放弃一切与本程序有关的民事责任的方式，来适用当地法律，除非程序是以收费的方式，连同保证书或责任书一起发行的的。

条款和适用条件结束。

如何在你的新程序中应用这些条款

如果你开发了一个新程序，而你又希望公众最大化使用它，最好的方式是让它成为自由软件，那么任何人都可以对程序进行再次分发和修改。

为了做到这一点，将如下声明附在程序里（译者注：需要使用英文原文）。最有效的排除担保的做法，是将它们放置在每份源文件的开始位置，这样最稳健。每一个文件至少需要一列“版权”行，并标明哪里可以找到完整的声明。

<一行给程序取个名字，写一个程序用途的简介>

版权所有（C）<年> <作者姓名>

本程序为自由软件，你可以依据GNU通用授权许可证的条款（自由软件基金会公布的第三版或者是你自己选择的其它后续版本），再分发和/或修改它。

该程序以具有实际用途为目的发布，但是并不包含任何担保，也不包含基于特定商用或健康用途的默认担保。具体细节请查看GNU通用授权许可证。

你在收到本程序的同时，也应当收到一份GNU通用公共授权许可证副本，如果没有，请查看<http://www.gnu.org/licenses/>。

同时添加你的书信或者电子邮箱地址。

如果程序可以进行终端交互，使其在开始交互时，输出一份类似的声明。

<程序>版权所有©<年><作者姓名>

本程序不含任何担保，查看细节输入'show w'

本程序为自由软件，你可以根据特定条件再分发，输入'show c'查看细节

设定的指令'show w' 和 'showc'应当显示公共通用授权许可证的对应部分。当然，你的程序指令可能有所差异，对于GUI界面而言，你可以使用“对话框”。

如果有必要，你应当联系你的雇主（如果你的工作是一名程序员）或者学校等等，来为本程序签订一份“版权放弃书”。更多信息，以及如何适用及遵循GNU通用公共授权许可证，查看<http://www.gnu.org/licenses/>。

GNU通用公共授权许可证并不允许将你的程序合并到私有程序中。如果你的程序是一个子程序库，你可以考虑允许私有应用程序链接该库，可能更为实用。如果你希望这么做，请使用GNU宽松通用公共授权许可协议替代本协议。但是首先，请阅读<http://www.gnu.org/philosophy/why-not-lgpl.html>。
</code></pre>
      <a href="http://shouce.jb51.net/codeigniter3.0/license.html">MIT License 中文译本</a>
             <pre sytle="font-family: monospace,monospace; font-size: 1em; display: block; padding: 1rem; margin: 1rem 0; line-height: 1.6; word-break: break-all; color: #555555; background-color: #f8f8f8; border: 1px solid #dedede; border-radius: 0;">
              <code style="padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0;">
MIT 开源许可协议

版权所有 (c) 2014 - 2015, 不列颠哥伦比亚理工学院

特此向任何得到本软件副本或相关文档的人授权：被授权人有权使用、复制、修改、 合并、出版、发布、散布、再授权和/或贩售软件及软件的副本，及授予被供应人 同等权利，只需服从以下义务：

在软件和软件的所有副本中都必须包含以上版权声明和本许可声明。

该软件是"按原样"提供的，没有任何形式的明示或暗示，包括但不限于为特定目的和 不侵权的适销性和适用性的保证担保。在任何情况下，作者或版权持有人，都无权要求 任何索赔，或有关损害赔偿的其他责任。无论在本软件的使用上或其他买卖交易中， 是否涉及合同，侵权或其他行为。
</code></pre>
<a href="https://blog.csdn.net/wusuojiban/article/details/89108641">GNU General Public License v3.0 非官方中文译本</a>
             <pre sytle="font-family: monospace,monospace; font-size: 1em; display: block; padding: 1rem; margin: 1rem 0; line-height: 1.6; word-break: break-all; color: #555555; background-color: #f8f8f8; border: 1px solid #dedede; border-radius: 0;">
              <code style="padding: 0; font-size: inherit; color: inherit; white-space: pre-wrap; background-color: transparent; border-radius: 0;">
              GNU通用公共许可协议
第三版，2007年6月29日
版权所有 © 2007 自由软件基金会 <http://fsf.org/>
任何人皆可复制和发布本协议的完整副本，但不得修改
【译者声明】
　　This is an unofficial translation of the GNU General Public License into Chinese. It was not published by the Free Software Foundation, and does not legally state the distribution terms for software that uses the GNU GPL--only the original English text of the GNU GPL does that. However, we hope that this translation will help Chinese speakers understand the GNU GPL better.
　　这是GNU通用公共许可协议的一份非官方中文翻译，并非自由软件基金会所发表，不适用于使用GNU通用公共许可协议发布的软件的法律声明——只有GNU通用公共许可协议英文原版才具有法律效力。不过我们希望本翻译能够帮助中文读者更好地理解GNU通用公共许可协议。

You may publish this translation, modified or unmodified, only under the terms at https://www.gnu.org/licenses/translations.html.

【引言】
　　GNU通用公共许可协议是一份面向软件及其他类型作品的，自由的版权共产协议。
　　就多数软件而言，许可协议被设计用于剥夺你分享和修改软件的自由。相反，GNU通用公共许可协议力图保障你分享和修改某程序全部版本的权利——确保自由软件对其用户来说是自由的。我们自由软件基金会将GNU通用公共许可协议用于我们的大多数软件，并为一些其他作品的作者效仿。你也可以将本协议用于你的程序。
　　所谓自由软件，强调自由，而非免费。本GNU通用公共许可协议设计用于确保你享有分发自由软件的自由（你可以为此服务收费），确保你可以在需要的时候获得这些软件的源码，确保你可以修改这些软件或者在新的自由软件中复用其中某些片段，并且确保你在这方面享有知情权。
　　为保障你的权益，我们需要作一些限定：禁止任何人否认你的上述权利，或者要求你放弃它们。因此，当你分发或修改这些软件时，你有一定的责任——尊重他人的自由。如果你分发这种程序的副本，无论收费还是免费，你必须给予与你同等的权利。你还要确保他们也能收到源码并了解他们的权利。
　　采用GNU通用公共许可协议的开发者通过两步保障你的权益：其一，申明软件的版权；其二，通过本协议使你可以合法地复制、分发和修改该软件。
　　为了保护每一位作者和开发者，GNU通用公共许可协议指明一点：自由软件并没有品质担保。为用户和作者双方着想，GNU通用公共许可协议要求修改版必须有标记，以免其问题被错误地归到先前版本的作者身上。
　　某些设备设计成拒绝用户安装运行修改过的软件，但厂商不受限。这和我们保护用户享有修改软件的自由的宗旨存在根本性矛盾。该滥用协议的模式出现于个人用品领域，这恰是最不可接受的。因此，我们设计了这版GNU通用公共许可协议来禁止这类产品。如果此类问题在其他领域涌现，我们时刻准备着在将来的版本中把规定扩展到相应领域，以保护用户的自由。
　　最后，每个程序都持续受到软件专利的威胁。政府不应该允许专利限制通用计算机软件的开发和应用，在做不到这点时，我们希望避免专利应用有效地使自由软件私有化的危险。就此，GNU通用公共许可协议保证专利不能使程序非自由化。

　　下文是关于复制、分发和修改的严谨描述和实施条件。

【关于复制、分发和修改的术语和条件】
〇、定义

　　“本协议”指GNU通用公共许可协议第三版。
　　“版权”也指适用于诸如半导体掩模的其他类型作品的类似法律。
　　“本程序”指任何在本协议保护下的有版权的作品。每个许可获得者称作“你”。“许可获得者”和“接收者”可以是个人或组织。
　　“修改”一个作品指需要版权许可的复制及对作品全面的或部分的改编行为，有别于制作副本。所产生的作品称作前作的“修改版”，或“基于”前作的作品。
　　“受保护作品”指程序或其派生作品。
　　“传播”作品指那些未经许可就会在适用版权法律下构成直接或间接侵权的行为，不包括在计算机上运行和私下的修改。传播包括复制、分发（无论修改与否）、向公众公开，以及在某些国家的其他行为。
　　“转发”作品指让他方能够制作或者接收副本的行为。仅仅通过计算机网络和用户交互，没有传输副本，则不算转发。
　　一个显示“适当的法律声明”的交互式用户界面应包括一个便捷而醒目的可视化特性：(1)显示适当的版权声明；(2)告知用户没有品质担保（提供了品质担保的情况除外），许可获得者可以在本协议约束下转发该作品，及查看本协议副本的途径。如果该界面提供一个命令列表，如菜单，其表项应符合上述规范。

一、源码

　　作品的源码指其可修改的首选形式，目标码指所有其他形式。
　　“标准接口”指标准化组织定义的官方标准中的接口，或针为某种编程语言设定的接口中为开发者广泛使用的接口。
　　可执行作品中的“系统库”不是指整个程序，而是涵盖此等内容：(a)以通常形式和主部件打包到一起却并非后者一部分，且(b)仅为和主部件一起使作品可用或实现某些已有公开实现源码的接口。“主部件”在这里指可执行作品运行依赖的操作系统（如果存在）的必要部件（内核、窗口系统等），生成该作品的编译器，或运行所需的目标码解释器。
　　目标码形式的作品中“相应的源码”指所有修改作品及生成、安装、运行（对可执行作品而言）目标码所需的源码，包括控制上述行为的脚本。可是，其中不包括系统库、通用工具、未修改直接用于支持上述行为却不是该作品一部分的通常可得的自由软件。例如，相应的源码包含配合作品源文件的接口定义，以及共享库和作品专门依赖的动态链接子程序的源码。这里的依赖体现为频密的数据交换或者该子程序和作品其他部分的控制流切换。
　　相应的源码不必包含那些用户可以通过源码其他部分自动生成的内容。
　　源码形式作品的相应源码即其本身。

二、基本许可

　　本协议的一切授权都是对本程序的版权而言的，并且在所述条件都满足时不可撤销。本协议明确批准你不受限制地运行本程序的未修改版本。受保护作品的运行输出，仅当其内容构成一个受保护作品时，才会为本协议所约束。如版权法所赋予，本协议承认你正当使用或与之等价的权利。
　　只要你获得的许可仍有效，你可以制作、运行和传播那些你并不转发的受保护作品。只要你遵守本协议中关于转发你不占有版权的材料的条款，你可以向他人转发，仅仅以求对方为你做定制或向你提供运行这些作品的工具。那些为你制作或运行这些受保护作品的人，应该在你的指引和控制下，谨代表你工作，即禁止他们在双方关系之外制作任何你提供的受版权保护材料的副本。
　　仅当满足后文所述条件时，其他各种情况下的转发才是允许的。不允许再授权行为，而第十条的存在使再授权变得没有必要。

三、保护用户的合法权益免受反破解法限制

　　在任何满足1996年12月20日通过的WIPO版权条约第11章要求的法律，或类似的禁止或限制技术手段破解的法律下，受保护作品不应该视为有效技术手段的一部分。
　　当你转发一个受保护作品时，你将失去任何通过法律途径限制技术手段破解的权力，乃至于通过行使本协议所予权利实现的破解。你即已表明无心通过限制用户操作或修改受保护作品来确保你或第三方关于禁止技术手段破解的法定权利。

四、转发完整副本

　　你可以通过任何媒介发布你接收到的本程序的完整源码副本，但要做到：为每一个副本醒目而恰当地发布版权；完整地保留关于本协议及按第七条加入的非许可性条款；完整地保留免责声明；给接收者附上一份本协议的副本。
　　你可以免费或收费转发，也可以选择提供技术支持或品质担保以换取收入。

五、转发修改过的源码版本

　　你可以以源码形式转发基于本程序的作品或修改的内容，除满足第四条外还需要满足以下几点要求：
　　a)该作品必须带有醒目的修改声明及相应的日期。
　　b)该作品必须带有醒目的声明，指出其在本协议及任何符合第七条的附加条件下发布。这个要求修正了第四条关于“完整保留”的内容。
　　c)你必须按照本协议将该作品整体向想要获得许可的人授权，本协议及符合第七条的附加条款就此适用于整个作品，即其每一部分，不管如何建包。本协议不允许以其他形式授权该作品，但如果你收到别的许可则另当别论。
　　d)如果该作品有交互式用户界面，则其必须显示适当的法律声明。然而，当本程序有交互式用户界面却不显示适当的法律声明时，你的作品也不必。
一个在存储或分发媒介上的受保护作品和其他分离的单体作品的联合作品，在既不是该受保护作品的自然扩展，也不以构筑更大的程序为目的，并且自身及其产生的版权并非用于限制单体作品给予联合作品用户的访问及其他合法权利时，称为“聚合体”。在聚合作品中包含受保护作品并不会使本协议影响聚合作品的其他部分。

六、以非源码形式转发

　　你可以如第四条和第五条所述那样以目标码形式转发受保护作品，同时在本协议规范下以如下方式之一转发机器可读的对应源码：
　　a)目标码通过实体产品（涵盖某种实体分发媒介）转发时，通过常用于软件交换的耐用型实体媒介随同转发相应的源码。
　　b)目标码通过实体产品（涵盖某种实体分发媒介）转发时，伴以具有至少三年且与售后服务等长有效期的书面承诺，给予目标码的持有者：(1)包含产品全部软件的相应源码的常用于软件交换的耐用型实体媒介，且收费不超过其合理的转发成本；或者(2)通过网络免费获得相应源码的途径。
　　c)单独转发目标码时，伴以提供源码的书面承诺。本选项仅在你收到目标码及b项形式的承诺的情况下可选。
　　d)通过在指定地点提供目标码获取服务（无论是否收费）的形式转发目标码时，在同一地点以同样的方式提供对等的源码获取服务，并不得额外收费。你不以要求接收者在复制目标码的同时复制源码。如果提供目标码复制的地点为网络服务器，相应的源码可以提供在另一个支持相同复制功能的服务器上（由你或者第三方运营），不过你要在目标码处指出相应源码的确切路径。不管你用什么源码服务器，你有义务要确保持续可用以满足这些要求。
　　e)通过点对点传输转发目标码时，告知其他节点目标码和源码在何处以d项形式向大众免费提供。
　　“面向用户的产品”指(1)“消费品”，即个人、家庭或日常用途的个人有形财产；或者(2)面向社会团体设计或销售，却落入居家之物。在判断一款产品是否消费品时，争议案例的判断将向利于扩大保护靠拢。就特定用户接收到特定产品而言，“正常使用”指对此类产品的典型或一般使用，不管该用户的身份，该用户对该产品的实际用法，以及该产品的预期用法。无论产品是否实质上具有商业上的，工业上的，及非面向消费者的用法，它都视为消费品，除非以上用法代表了它唯一的重要使用模式。
　　“安装信息”对面向用户的产品而言，指基于修改过的源码安装运行该产品中的受保护作品的修改版所需的方法、流程、认证码及其他信息。这些信息必须足以保证修改过的目标码不会仅仅因为被修改过而不能继续工作。
　　如果你根据本条在，或随，或针对一款面向用户的产品，以目标码形式转发某作品，且转发体现于该产品的所有权和使用权永久或者在一定时期内转让予接收者的过程（无论其有何特点），根据本条进行的源码转发必须伴有安装信息。不过，如果你和第三方都没有保留在该产品上安装修改后的目标码的能力（如作品安装在ROM上），这项要求不成立。 　　要求提供安装信息并不要求为修改或安装的作品，以及其载体产品继续提供技术支持、品质担保和升级。当修改本身对网络运行有实质上的负面影响，或违背了网络通信协议和规则时，可以拒绝其联网。
　　根据本条发布的源码及安装信息，必须以公共的文件格式（并且存在可用的空开源码的处理工具）存在，同时不得对解压、阅读和复制设置任何密码。

七、附加条款

　　“附加许可”用于补充本协议，以允许一些例外情况。合乎适用法律的对整个程序适用的附加许可，应该被视为本协议的内容。如果附加许可作用于程序的某部分，则该部分受此附加许可约束，而其他部分不受其影响。
　　当你转发本程序时，你可以选择性删除副本或其部分的附加条款。（附加条款可以写明在某些情况下要求你修改时删除该条款。）在你拥有或可授予恰当版权许可的受保护作品中，你可以在你添加的材料上附加许可。
　　尽管已存在本协议的其他条款，对你添加到受保护作品的材料，你可以（如果你获得该材料版权持有人的授权）以如下条款补充本协议：
　　a)表示不提供品质担保或有超出十五、十六条的责任。
　　b)要求在此材料中或在适当的法律声明中保留特定的合理法律声明或创作印记。
　　c)禁止误传材料的起源，或要求合理标示修改以别于原版。
　　d)限制以宣传为目的使用该材料的作者或授权人的名号。
　　e)降低约束以便赋予在商标法下使用商品名、商品标识及服务标识。
　　f)要求任何转发该材料（或其修改版）并对接收者提供契约性责任许诺的人，保证这种许诺不会给作者或授权人带来连带责任。
　　此外的非许可性附加条款都被视作第十条所说的“进一步的限制”。如果你接收到的程序或其部分，声称受本协议约束，却补充了这种进一步的限制条款，你可以去掉它们。如果某许可协议包含进一步的限制条款，但允许通过本协议再授权或转发，你可以通过本协议再授权或转发加入了受前协议管理的材料，不过要同时移除上述条款。
　　如果你根据本条向受保护作品添加了调控，你必须在相关的源文件中加入对应的声明，或者指出哪里可以找到它们。
　　附加条款，不管是许可性的还是非许可性的，可以以独立的书面协议出现，也可以声明为例外情况，两种做法都可以实现上述要求。

八、终止授权

　　除非在本协议明确授权下，你不得传播或修改受保护作品。其他任何传播或修改受保护作品的企图都是无效的，并将自动中止你通过本协议获得的权利（包括第十一条第3段中提到的专利授权）。
　　然而，当你不再违反本协议时，你从特定版权持有人处获得的授权恢复：(1)暂时恢复，直到版权持有人明确终止；(2)永久恢复，如果版权持有人没能在60天内以合理的方式指出你的侵权行为。
　　再者，如果你第一次收到了特定版权持有人关于你违反本协议（对任意作品）的通告，且在收到通告后30天内改正，那你可以继续享此有授权。
　　当你享有的权利如本条所述被中止时，已经从你那根据本协议获得授权的他方的权利不会因此中止。在你的权利恢复之前，你没有资格凭第十条获得同一材料的授权。

九、持有副本无需接受协议

　　你不必为接收或运行本程序而接受本协议。类似的，仅仅因点对点传输接收到副本引发的对受保护作品的辅助性传播，并不要求接受本协议。但是，除本协议外没有什么可以授权你传播或修改任何受保护作品。如果你不接受本协议，这些行为就侵犯了版权。因此，一旦修改和传播一个受保护作品，就表明你接受本协议。

十、对下游接收者的自动授权

　　每当你转发一个受保护作品，其接收者自动获得来自初始授权人的授权，依照本协议可以运行、修改和传播此作。你没有要求第三方遵守该协议的义务。
　　“实体事务”指转移一个组织的控制权或全部资产、或拆分或合并组织的事务。如果实体事务导致一个受保护作品的传播，则事务中各收到作品副本方，都有获得前利益相关者享有或可以如前段所述提供的对该作品的任何授权，以及从前利益相关者处获得并拥有相应的源码的权利，如果前利益相关者享有或可以通过合理的努力获得此源码。
　　你不可以对本协议所授权利的行使施以进一步的限制。例如，你不可以索要授权费或版税，或就行使本协议所授权利征收其他费用；你也不能发起诉讼（包括交互诉讼和反诉），宣称制作、使用、零售、批发、引进本程序或其部分的行为侵犯了任何专利。

十一、专利

　　“贡献人”指通过本协议对本程序或其派生作品进行使用认证的版权持有人。授权作品成为贡献人的“贡献者版”。
　　贡献人的“实质专利权限”指其拥有或掌控的，无论是已获得的还是将获得的全部专利权限中，可能被通过某种本协议允许的方式制作、使用或销售其贡献者版作品的行为侵犯的部分，不包括仅有修改其贡献者版作品才构成侵犯的部分。“掌控”所指包括享有和本协议相一致的专利再授权的权利。
　　每位贡献人皆其就实质专利权限，授予你一份全球有效的免版税的非独占专利许可，以制作、使用、零售、批发、引进，及运行、修改、传播其贡献者版的内容。
　　在以下三段中，“专利许可”指通过任何方式明确表达的不行使专利权（如对使用专利的明确许可和不起诉专利侵权的契约）的协议或承诺。对某方“授予”专利许可，指这种不对其行使专利权的协议或承诺。
　　如果你转发的受保护作品已知依赖于某专利，而其相应的源码并不是任何人都能根据本协议从网上或其他地方免费获得，那你必须(1)以上述方式提供相应的源码；或者(2)放弃从该程序的专利许可中获得利益；或者(3)以某种和本协议相一致的方式将专利许可扩展到下游接收者。“已知依赖于”指你实际上知道若没有专利许可，你在某国家转发受保护作品的行为，或者接收者在某国家使用受保护作品的行为，会侵犯一项或多项该国认定的专利，而这些专利你有理由相信它们的有效性。
　　如果根据一项事务或安排，抑或与之相关，你转发某受保护作品，或通过促成其转手以实现传播，并且该作品的接收方授予专利许可，以使指可以使用、传播、修改或转发该作品的特定副本，则此等专利许可将自动延伸及每一个收到该作品或其派生作品的人。
　　如果某专利在其涵盖范围内，不包含本协议专门赋予的一项或多项权利，禁止行使它们或以不行使它们为前提，则该专利是“歧视性”的。如果你和软件发布行业的第三方有合作，合作要求你就转发受保护作品的情况向其付费，并授予作品接收方歧视性专利，而且该专利(a)与你转发的副本（或在此基础上制作的副本）有关，或针对包含该受保护作品的产品或联合作品，你不得转发本程序，除非参加此项合作或取得该专利早于2007年3月28日。
　　本协议的任何部分不应被解释成在排斥或限制任何暗含的授权，或者其他在适用法律下对抗侵权的措施。

十二、不得牺牲他人的自由

　　即便你面临与本协议条款冲突的条件（来自于法庭要求、协议或其他），那也不能成为你违背本协议的理由。倘若你不能在转发受保护作品时同时满足本协议和其他文件的要求，你就不能转发本程序。例如，当你同意了某些要求你就再转发问题向你的转发对象收取版税的条款时，唯一能同时满足它和本协议要求的做法便是不转发本程序。

十三、和GNU Affero通用公共许可协议一起使用

　　尽管已存在本协议的一些条款，你可以将任何受保护作品与以GNU Affero通用公共许可协议管理的作品关联或组合成一个联合作品，并转发。本协议对其中的受保护作品部分仍然有效，但GNU Affero通用公共许可协议第十三条的关于网络交互的特别要求适用于整个联合作品。

十四、本协议的修订版

　　自由软件联盟可能会不定时发布GNU通用公共许可协议的修订版或新版。新版将秉承当前版本的精神，但对问题或事项的描述细节不尽相同。
　　每一版都会有不同的版本号，如果本程序指定其使用的GNU通用公共许可协议的版本“或任何更新的版本”，你可以选择遵守该版本或者任何更新的版本的条款。如果本程序没有指定协议版本，你可以选用自由软件联盟发布的任意版本的GNU通用公共许可协议。
　　如果本程序指定代理来决定将来那个GNU通用公共许可协议版本适用，则该代理的公开声明将指导你选择协议版本。
　　新的版本可能会给予你额外或不同的许可。但是，任何作者或版权持有人的义务，不会因为你选择新的版本而增加。

十五、不提供品质担保

　　本程序在适用法律范围内不提供品质担保。除非另作书面声明，版权持有人及其他程序提供者“概”不提供任何显式或隐式的品质担保，品质担保所指包括而不仅限于有经济价值和适合特定用途的保证。全部风险，如程序的质量和性能问题，皆由你承担。若程序出现缺陷，你将承担所有必要的修复和更正服务的费用。

十六、责任范围

　　除非适用法律或书面协议要求，任何版权持有人或本程序按本协议可能存在的第三方修改和再发布者，都不对你的损失负有责任，包括由于使用或者不能使用本程序造成的任何一般的、特殊的、偶发的或重大的损失（包括而不仅限于数据丢失、数据失真、你或第三方的后续损失、其他程序无法与本程序协同运作），即使那些人声称会对此负责

十七、第十五条和第十六条的解释

　　如果上述免责声明和责任范围声明不为地方法律所支持，上诉法庭应采用与之最接近的关于放弃本程序相关民事责任的地方法律，除非本程序附带收费的品质担保或责任许诺。

【附录：如何将上述条款应用到你的新程序】
　　如果你开发了一个新程序，并希望它能最大限度地为公众所使用，最好的办法是将其作为自由软件，以使每个人都能在本协议约束下对其再发布及修改。
　　为此，请在附上以下声明。最安全的做法是将其附在每份源码的开头，以便于最有效地传递免责信息。同时，每个文件至少包含一处“版权”声明和一个协议全文的链接。

　　<用一行来标明程序名及其作用>
　　版权所有（C）<年份> <作者姓名>
　　本程序为自由软件，在自由软件联盟发布的GNU通用公共许可协议的约束下，你可以对其进行再发布及修改。协议版本为第三版或（随你）更新的版本。
　　我们希望发布的这款程序有用，但不保证，甚至不保证它有经济价值和适合特定用途。详情参见GNU通用公共许可协议。
　　你理当已收到一份GNU通用公共许可协议的副本，如果没有，请查阅<http://www.gnu.org/licenses/>

　　同时提供你的电子邮件地址或传统的邮件联系方式。

　　如果该程序是交互式的，让它在交互模式下输出类似下面的一段声明：

　　<程序名> 第69版，版权所有（C）<年份> <作者姓名>
　　本程序从未提供品质担保，输入'show w'可查看详情。这是款自由软件，欢迎你在满足一定条件后对其再发布，输入'show c'可查看详情。

　　例子中的命令'show w'和'show c'应用于显示GNU通用公共许可协议相应的部分。当然你也可以因地制宜地选用别的方式，对图形界面程序可以用“关于”菜单。

　　如果你之上存在雇主（你是码农）或校方，你还应当让他们在必要时为此程序签署放弃版权声明。详情参见<http://www.gnu.org/licenses/>。

　　本GNU通用公共许可协议不允许把你的程序并入私有程序。如果你的程序是某种库，且你想允许它被私有程序链接而使之更有用，请使用GNU较宽松通用公共许可协议。决定前请先查阅<http://www.gnu.org/philosophy/why-not-lgpl.html>。


    翻译：阮坤良<peterrk@pku.edu.cn>
    </code></pre>
             </div>
         </div>
         <div class="mdui-dialog-actions">
             <button class="mdui-btn mdui-ripple" onclick="window.CopyrightDialog.close();">关闭</button>
         </div>
    </div>`;
    document.body.appendChild(copyrightDialog);
    setTimeout(function(){window.CopyrightDialog = new mdui.Dialog("#copyright_dialog");}, 750); //修复找不到mdui的问题
    var infor = document.createElement("div");
    infor.innerHTML = `
    洛谷强化插件 使用<a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" href="https://opensource.org/licenses/GPL-3.0">GNU General Public License v3.0许可证</a><br>
    <a data-v-303bbf52 data-v-3e2ae97b target="_blank" colorscheme="default" class="color-default" onclick="window.CopyrightDialog.open();">点击此处以获取更多信息。`;
    buttombar.appendChild(infor);
    //***********************
    //洛谷表情管理，作者Maxmilite
    //代码来自于https://greasyfork.org/zh-CN/scripts/426868-luoguemojisender/code
    //***********************
    //简单说下，这个玩意有它自己的配置管理，我简单整合了下配置更改，但是加载还是独立的，不予原来的加载合并
    setTimeout(function(){
        var functionIsOn = true, seamlessMode = false, queryIsOn = true;
        var prefix = "{", suffix = "}";
        var userElement = {
            "样例1": "XXX1.com",
            "样例2": "XXX2.com",
            "样例3": "XXX3.com",
            "样例4": "XXX4.com"
        };
        const replaceElement = {
            "/ybyb": "![qq_emoji: ybyb](https://z3.ax1x.com/2021/05/30/2VUvAH.png)",
            "/wosl": "![qq_emoji: wosl](https://z3.ax1x.com/2021/05/30/2VUSyT.png)",
            "/hs": "![qq_emoji: hs](https://z3.ax1x.com/2021/05/30/2VNzlV.png)",
            "/psj": "![qq_emoji: psj](https://z3.ax1x.com/2021/05/30/2VNjWq.png)",
            "/na": "![qq_emoji: na](https://z3.ax1x.com/2021/05/30/2VNqoj.png)",
            "/bx": "![qq_emoji: bx](https://z3.ax1x.com/2021/05/30/2VNbwQ.png)",
            "/qdqd": "![qq_emoji: qdqd](https://z3.ax1x.com/2021/05/30/2VNTOS.png)",
            "/zy": "![qq_emoji: zy](https://z3.ax1x.com/2021/05/30/2VNIQf.png)",
            "/nqct": "![qq_emoji: nqct](https://z3.ax1x.com/2021/05/30/2VNlR0.png)",
            "/nzqk": "![qq_emoji: nzqk](https://z3.ax1x.com/2021/05/30/2VNQGq.png)",
            "/mjl": "![qq_emoji: mjl](https://z3.ax1x.com/2021/05/30/2VNuIs.png)",
            "/gun": "![qq_emoji: gun](https://z3.ax1x.com/2021/05/30/2VtyUs.png)",
            "/cb": "![qq_emoji: cb](https://z3.ax1x.com/2021/05/30/2Vtagf.png)",
            "/my": "![qq_emoji: my](https://z3.ax1x.com/2021/05/30/2VtGEd.png)",
            "/mwbq": "![qq_emoji: mwbq](https://z3.ax1x.com/2021/05/30/2Vtu36.png)",
            "/kx": "![qq_emoji: kx](https://z3.ax1x.com/2021/05/30/2VYvAs.png)",
            "/jl": "![qq_emoji: jl](https://z3.ax1x.com/2021/05/30/2VY5tI.png)",
            "/wyx": "![qq_emoji: wyx](https://z3.ax1x.com/2021/05/30/2VY8f0.png)",
            "/ww": "![qq_emoji: ww](https://z3.ax1x.com/2021/05/30/2VYiTA.png)",
            "/mdfq": "![qq_emoji: mdfq](https://z3.ax1x.com/2021/05/30/2VJQG6.png)",
            "/banzz": "![qq_emoji: banzz](https://z3.ax1x.com/2021/05/30/2VJMPx.png)",
            "/mgx": "![qq_emoji: mgx](https://z3.ax1x.com/2021/05/30/2VGyU1.png)",
            "/aini": "![qq_emoji: aini](https://xn--9zr.tk/aini)",
            "/aiq": "![qq_emoji: aiq](https://xn--9zr.tk/aiq)",
            "/am": "![qq_emoji: am](https://xn--9zr.tk/am)",
            "/azgc": "![qq_emoji: azgc](https://z3.ax1x.com/2021/05/30/2VJqoR.png)",
            "/baiy": "![qq_emoji: baiy](https://xn--9zr.tk/baiy)",
            "/bangbangt": "![qq_emoji: bangbangt](https://xn--9zr.tk/bangbangt)",
            "/baojin": "![qq_emoji: baojin](https://xn--9zr.tk/baojin)",
            "/bb": "![qq_emoji: bb](https://xn--9zr.tk/bb)",
            "/bkx": "![qq_emoji: bkx](https://xn--9zr.tk/bkx)",
            "/bl": "![qq_emoji: bl](https://xn--9zr.tk/bl)",
            "/bobo": "![qq_emoji: bobo](https://xn--9zr.tk/bobo)",
            "/bp": "![qq_emoji: bp](https://xn--9zr.tk/bp)",
            "/bq": "![qq_emoji: bq](https://xn--9zr.tk/bq)",
            "/bs": "![qq_emoji: bs](https://xn--9zr.tk/bs)",
            "/bt": "![qq_emoji: bt](https://xn--9zr.tk/bt)",
            "/bu": "![qq_emoji: bu](https://xn--9zr.tk/bu)",
            "/bz": "![qq_emoji: bz](https://xn--9zr.tk/bz)",
            // "/cd": "![qq_emoji: cd](https://xn--9zr.tk/cd)",
            "/cengyiceng": "![qq_emoji: cengyiceng](https://xn--9zr.tk/cengyiceng)",
            "/cg": "![qq_emoji: cg](https://z3.ax1x.com/2021/05/30/2VJxSK.png)",
            "/ch": "![qq_emoji: ch](https://xn--9zr.tk/ch)",
            "/chi": "![qq_emoji: chi](https://xn--9zr.tk/chi)",
            "/cj": "![qq_emoji: cj](https://xn--9zr.tk/cj)",
            "/cp": "![qq_emoji: cp](https://xn--9zr.tk/cp)",
            "/cs": "![qq_emoji: cs](https://z3.ax1x.com/2021/05/30/2VJWiq.png)",
            "/cy": "![qq_emoji: cy](https://xn--9zr.tk/cy)",
            "/dan": "![qq_emoji: dan](https://xn--9zr.tk/dan)",
            "/dao": "![qq_emoji: dao](https://xn--9zr.tk/dao)",
            "/db": "![qq_emoji: db](https://xn--9zr.tk/db)",
            "/dg": "![qq_emoji: dg](https://xn--9zr.tk/dg)",
            "/dgg": "![qq_emoji: dgg](https://xn--9zr.tk/dgg)",
            "/dk": "![qq_emoji: dk](https://xn--9zr.tk/dk)",
            "/dl": "![qq_emoji: dl](https://xn--9zr.tk/dl)",
            "/doge": "![qq_emoji: doge](https://xn--9zr.tk/doge)",
            "/dx": "![qq_emoji: dx](https://xn--9zr.tk/dx)",
            "/dy": "![qq_emoji: dy](https://xn--9zr.tk/dy)",
            "/dz": "![qq_emoji: dz](https://xn--9zr.tk/dz)",
            "/ee": "![qq_emoji: ee](https://xn--9zr.tk/ee)",
            "/emm": "![qq_emoji: emm](https://z3.ax1x.com/2021/05/30/2VJjW6.png)",
            "/fad": "![qq_emoji: fad](https://xn--9zr.tk/fad)",
            "/fade": "![qq_emoji: fade](https://xn--9zr.tk/fade)",
            "/fan": "![qq_emoji: fan](https://xn--9zr.tk/fan)",
            "/fd": "![qq_emoji: fd](https://xn--9zr.tk/fd)",
            "/fendou": "![qq_emoji: fendou](https://xn--9zr.tk/fendou)",
            "/fj": "![qq_emoji: fj](https://xn--9zr.tk/fj)",
            "/fn": "![qq_emoji: fn](https://xn--9zr.tk/fn)",
            "/fw": "![qq_emoji: fw](https://xn--9zr.tk/fw)",
            "/gg": "![qq_emoji: gg](https://xn--9zr.tk/gg)",
            "/gy": "![qq_emoji: gy](https://xn--9zr.tk/gy)",
            "/gz": "![qq_emoji: gz](https://xn--9zr.tk/gz)",
            "/hanx": "![qq_emoji: hanx](https://xn--9zr.tk/hanx)",
            "/haob": "![qq_emoji: haob](https://xn--9zr.tk/haob)",
            "/hb": "![qq_emoji: hb](https://xn--9zr.tk/hb)",
            "/hc": "![qq_emoji: hc](https://xn--9zr.tk/hc)",
            "/hd": "![qq_emoji: hd](https://xn--9zr.tk/hd)",
            "/hec": "![qq_emoji: hec](https://xn--9zr.tk/hec)",
            "/hhd": "![qq_emoji: hhd](https://z3.ax1x.com/2021/05/30/2VYpOe.png)",
            "/hn": "![qq_emoji: hn](https://xn--9zr.tk/hn)",
            "/hp": "![qq_emoji: hp](https://xn--9zr.tk/hp)",
            "/hq": "![qq_emoji: hq](https://xn--9zr.tk/hq)",
            "/hsh": "![qq_emoji: hsh](https://xn--9zr.tk/hsh)",
            "/ht": "![qq_emoji: ht](https://xn--9zr.tk/ht)",
            "/huaix": "![qq_emoji: huaix](https://xn--9zr.tk/huaix)",
            "/hx": "![qq_emoji: hx](https://xn--9zr.tk/hx)",
            "/jd": "![qq_emoji: jd](https://xn--9zr.tk/jd)",
            "/jh": "![qq_emoji: jh](https://xn--9zr.tk/jh)",
            "/jiaybb": "![qq_emoji: jiaybb](https://xn--9zr.tk/jiaybb)",
            "/jiaybs": "![qq_emoji: jiaybs](https://xn--9zr.tk/jiaybs)",
            "/jie": "![qq_emoji: jie](https://xn--9zr.tk/jie)",
            "/jk": "![qq_emoji: jk](https://xn--9zr.tk/jk)",
            "/jw": "![qq_emoji: jw](https://xn--9zr.tk/jw)",
            "/jx": "![qq_emoji: jx](https://xn--9zr.tk/jx)",
            "/jy": "![qq_emoji: jy](https://xn--9zr.tk/jy)",
            "/ka": "![qq_emoji: ka](https://xn--9zr.tk/ka)",
            "/kb": "![qq_emoji: kb](https://xn--9zr.tk/kb)",
            "/kel": "![qq_emoji: kel](https://xn--9zr.tk/kel)",
            "/kf": "![qq_emoji: kf](https://xn--9zr.tk/kf)",
            "/kg": "![qq_emoji: kg](https://xn--9zr.tk/kg)",
            "/kk": "![qq_emoji: kk](https://xn--9zr.tk/kk)",
            "/kl": "![qq_emoji: kl](https://xn--9zr.tk/kl)",
            "/kt": "![qq_emoji: kt](https://xn--9zr.tk/kt)",
            "/kuk": "![qq_emoji: kuk](https://xn--9zr.tk/kuk)",
            "/kun": "![qq_emoji: kun](https://xn--9zr.tk/kun)",
            "/kzht": "![qq_emoji: kzht](https://xn--9zr.tk/kzht)",
            "/lb": "![qq_emoji: lb](https://xn--9zr.tk/lb)",
            "/lengh": "![qq_emoji: lengh](https://xn--9zr.tk/lengh)",
            "/lh": "![qq_emoji: lh](https://xn--9zr.tk/lh)",
            "/ll": "![qq_emoji: ll](https://xn--9zr.tk/ll)",
            "/lm": "![qq_emoji: lm](https://xn--9zr.tk/lm)",
            "/lq": "![qq_emoji: lq](https://xn--9zr.tk/lq)",
            "/lw": "![qq_emoji: lw](https://xn--9zr.tk/lw)",
            "/lyj": "![qq_emoji: lyj](https://z3.ax1x.com/2021/05/30/2VJhWV.png)",
            "/meigui": "![qq_emoji: meigui](https://xn--9zr.tk/mg)",
            "/mm": "![qq_emoji: mm](https://xn--9zr.tk/mm)",
            "/ng": "![qq_emoji: ng](https://xn--9zr.tk/ng)",
            "/nkt": "![qq_emoji: nkt](https://z3.ax1x.com/2021/05/30/2VJrQS.png)",
            "/oh": "![qq_emoji: oh](https://xn--9zr.tk/oh)",
            "/oy": "![qq_emoji: oy](https://z3.ax1x.com/2021/05/30/2VJ4zT.png)",
            "/pch": "![qq_emoji: pch](https://xn--9zr.tk/pch)",
            "/pj": "![qq_emoji: pj](https://xn--9zr.tk/pj)",
            "/pp": "![qq_emoji: pp](https://xn--9zr.tk/pp)",
            "/pt": "![qq_emoji: pt](https://xn--9zr.tk/pt)",
            "/px": "![qq_emoji: px](https://xn--9zr.tk/px)",
            "/qd": "![qq_emoji: qd](https://xn--9zr.tk/qd)",
            "/qiang": "![qq_emoji: qiang](https://xn--9zr.tk/qiang)",
            "/qiao": "![qq_emoji: qiao](https://xn--9zr.tk/qiao)",
            "/qq": "![qq_emoji: qq](https://xn--9zr.tk/qq)",
            "/qt": "![qq_emoji: qt](https://xn--9zr.tk/qt)",
            "/ruo": "![qq_emoji: ruo](https://xn--9zr.tk/ruo)",
            "/sa": "![qq_emoji: sa](https://xn--9zr.tk/sa)",
            "/se": "![qq_emoji: se](https://xn--9zr.tk/se)",
            "/sh": "![qq_emoji: sh](https://xn--9zr.tk/sh)",
            "/shd": "![qq_emoji: shd](https://xn--9zr.tk/shd)",
            "/shl": "![qq_emoji: shl](https://xn--9zr.tk/shl)",
            "/shuai": "![qq_emoji: shuai](https://xn--9zr.tk/shuai)",
            "/shui": "![qq_emoji: shui](https://xn--9zr.tk/shui)",
            "/shxi": "![qq_emoji: shxi](https://xn--9zr.tk/shxi)",
            "/sr": "![qq_emoji: sr](https://xn--9zr.tk/sr)",
            "/tiao": "![qq_emoji: tiao](https://xn--9zr.tk/tiao)",
            "/tl": "![qq_emoji: tl](https://xn--9zr.tk/tl)",
            "/tnl": "![qq_emoji: tnl](https://xn--9zr.tk/tnl)",
            "/tp": "![qq_emoji: tp](https://xn--9zr.tk/tp)",
            "/ts": "![qq_emoji: ts](https://xn--9zr.tk/ts)",
            "/tsh": "![qq_emoji: tsh](https://xn--9zr.tk/tsh)",
            "/tt": "![qq_emoji: tt](https://z3.ax1x.com/2021/05/30/2VJIQU.png)",
            "/tuu": "![qq_emoji: tuu](https://xn--9zr.tk/tuu)",
            "/tx": "![qq_emoji: tx](https://xn--9zr.tk/tx)",
            "/taiyang": "![qq_emoji: ty](https://xn--9zr.tk/ty)",
            "/tyt": "![qq_emoji: tyt](https://xn--9zr.tk/tyt)",
            "/wbk": "![qq_emoji: wbk](https://xn--9zr.tk/wbk)",
            "/whl": "![qq_emoji: whl](https://z3.ax1x.com/2021/05/30/2VJHeJ.png)",
            "/wl": "![qq_emoji: wl](https://xn--9zr.tk/wl)",
            "/wn": "![qq_emoji: wn](https://xn--9zr.tk/wn)",
            "/wq": "![qq_emoji: wq](https://xn--9zr.tk/wq)",
            "/ws": "![qq_emoji: ws](https://xn--9zr.tk/ws)",
            "/wul": "![qq_emoji: wul](https://z3.ax1x.com/2021/05/30/2VJfJ0.png)",
            "/wx": "![qq_emoji: wx](https://xn--9zr.tk/wx)",
            "/wzm": "![qq_emoji: wzm](https://xn--9zr.tk/wzm)",
            "/xhx": "![qq_emoji: xhx](https://xn--9zr.tk/xhx)",
            "/xia": "![qq_emoji: xia](https://xn--9zr.tk/xia)",
            "/xig": "![qq_emoji: xig](https://xn--9zr.tk/xig)",
            "/xin": "![qq_emoji: xin](https://xn--9zr.tk/xin)",
            "/xjj": "![qq_emoji: xjj](https://xn--9zr.tk/xjj)",
            "/xk": "![qq_emoji: xk](https://xn--9zr.tk/xk)",
            "/xs": "![qq_emoji: xs](https://xn--9zr.tk/xs)",
            "/xu": "![qq_emoji: xu](https://xn--9zr.tk/xu)",
            "/xw": "![qq_emoji: xw](https://xn--9zr.tk/xw)",
            "/xy": "![qq_emoji: xy](https://xn--9zr.tk/xy)",
            "/xyx": "![qq_emoji: xyx](https://xn--9zr.tk/xyx)",
            "/yao": "![qq_emoji: yao](https://xn--9zr.tk/yao)",
            "/yb": "![qq_emoji: yb](https://xn--9zr.tk/yb)",
            "/yhh": "![qq_emoji: yhh](https://xn--9zr.tk/yhh)",
            "/yiw": "![qq_emoji: yiw](https://xn--9zr.tk/yiw)",
            "/yl": "![qq_emoji: yl](https://xn--9zr.tk/yl)",
            "/youl": "![qq_emoji: youl](https://xn--9zr.tk/youl)",
            "/youtj": "![qq_emoji: youtj](https://xn--9zr.tk/youtj)",
            "/yt": "![qq_emoji: yt](https://xn--9zr.tk/yt)",
            "/yun": "![qq_emoji: yun](https://xn--9zr.tk/yun)",
            "/yx": "![qq_emoji: yx](https://xn--9zr.tk/yx)",
            "/zhd": "![qq_emoji: zhd](https://xn--9zr.tk/zhd)",
            "/zhem": "![qq_emoji: zhem](https://xn--9zr.tk/zhem)",
            "/zhh": "![qq_emoji: zhh](https://xn--9zr.tk/zhh)",
            "/zhm": "![qq_emoji: zhm](https://xn--9zr.tk/zhm)",
            "/zhq": "![qq_emoji: zhq](https://xn--9zr.tk/zhq)",
            "/zj": "![qq_emoji: zj](https://xn--9zr.tk/zj)",
            "/zk": "![qq_emoji: zk](https://xn--9zr.tk/zk)",
            "/zq": "![qq_emoji: zq](https://xn--9zr.tk/zq)",
            "/zt": "![qq_emoji: zt](https://xn--9zr.tk/zt)",
            "/zuotj": "![qq_emoji: zuotj](https://xn--9zr.tk/zuotj)",
            "/114514": "[![为什么您会找到一个在 QQ 表情里没有的东西](https://z3.ax1x.com/2021/05/30/2Eook9.png)](https://github.com/Maxmilite/LuoguEmojiSender)",
            "/maj-1!": "![majsoul: 1](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-1.png)",
            "/maj-2!": "![majsoul: 2](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-2.png)",
            "/maj-3!": "![majsoul: 3](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-3.png)",
            "/maj-4!": "![majsoul: 4](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-4.png)",
            "/maj-5!": "![majsoul: 5](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-5.png)",
            "/maj-6!": "![majsoul: 6](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-6.png)",
            "/maj-7!": "![majsoul: 7](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-7.png)",
            "/maj-8!": "![majsoul: 8](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-8.png)",
            "/maj-9!": "![majsoul: 9](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-9.png)",
            "/maj-10!": "![majsoul: 10](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-10.png)",
            "/maj-11!": "![majsoul: 11](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-11.png)",
            "/maj-12!": "![majsoul: 12](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-12.png)",
            "/maj-13!": "![majsoul: 13](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-13.png)",
            "/maj-14!": "![majsoul: 14](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-14.png)",
            "/maj-15!": "![majsoul: 15](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-15.png)",
            "/maj-16!": "![majsoul: 16](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-16.png)",
            "/maj-17!": "![majsoul: 17](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-17.png)",
            "/maj-18!": "![majsoul: 18](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-18.png)",
            "/maj-19!": "![majsoul: 19](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-19.png)",
            "/maj-20!": "![majsoul: 20](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-20.png)",
            "/maj-21!": "![majsoul: 21](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-21.png)",
            "/maj-22!": "![majsoul: 22](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-22.png)",
            "/maj-23!": "![majsoul: 23](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-23.png)",
            "/maj-24!": "![majsoul: 24](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-24.png)",
            "/maj-25!": "![majsoul: 25](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-25.png)",
            "/maj-26!": "![majsoul: 26](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-26.png)",
            "/maj-27!": "![majsoul: 27](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-27.png)",
            "/maj-28!": "![majsoul: 28](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-28.png)",
            "/maj-29!": "![majsoul: 29](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-29.png)",
            "/maj-30!": "![majsoul: 30](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-30.png)",
            "/maj-31!": "![majsoul: 31](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-31.png)",
            "/maj-32!": "![majsoul: 32](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-32.png)",
            "/maj-33!": "![majsoul: 33](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-33.png)",
            "/maj-34!": "![majsoul: 34](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-34.png)",
            "/maj-35!": "![majsoul: 35](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-35.png)",
            "/maj-36!": "![majsoul: 36](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-36.png)",
            "/maj-37!": "![majsoul: 37](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-37.png)",
            "/maj-38!": "![majsoul: 38](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-38.png)",
            "/maj-39!": "![majsoul: 39](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-39.png)",
            "/maj-40!": "![majsoul: 40](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-40.png)",
            "/maj-41!": "![majsoul: 41](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-41.png)",
            "/maj-42!": "![majsoul: 42](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-42.png)",
            "/maj-43!": "![majsoul: 43](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-43.png)",
            "/maj-44!": "![majsoul: 44](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-44.png)",
            "/maj-45!": "![majsoul: 45](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-45.png)",
            "/maj-46!": "![majsoul: 46](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-46.png)",
            "/maj-47!": "![majsoul: 47](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-47.png)",
            "/maj-48!": "![majsoul: 48](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-48.png)",
            "/maj-49!": "![majsoul: 49](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-49.png)",
            "/maj-50!": "![majsoul: 50](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-50.png)",
            "/maj-51!": "![majsoul: 51](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-51.png)",
            "/maj-52!": "![majsoul: 52](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-52.png)",
            "/maj-53!": "![majsoul: 53](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-53.png)",
            "/maj-54!": "![majsoul: 54](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-54.png)",
            "/maj-55!": "![majsoul: 55](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-55.png)",
            "/maj-56!": "![majsoul: 56](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-56.png)",
            "/maj-57!": "![majsoul: 57](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-57.png)",
            "/maj-58!": "![majsoul: 58](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-58.png)",
            "/maj-59!": "![majsoul: 59](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-59.png)",
            "/maj-60!": "![majsoul: 60](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-60.png)",
            "/maj-61!": "![majsoul: 61](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-61.png)",
            "/maj-62!": "![majsoul: 62](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-62.png)",
            "/maj-63!": "![majsoul: 63](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-63.png)",
            "/maj-64!": "![majsoul: 64](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-64.png)",
            "/maj-65!": "![majsoul: 65](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-65.png)",
            "/maj-66!": "![majsoul: 66](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-66.png)",
            "/maj-67!": "![majsoul: 67](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-67.png)",
            "/maj-68!": "![majsoul: 68](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-68.png)",
            "/maj-69!": "![majsoul: 69](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-69.png)",
            "/maj-70!": "![majsoul: 70](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-70.png)",
            "/maj-71!": "![majsoul: 71](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-71.png)",
            "/maj-72!": "![majsoul: 72](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-72.png)",
            "/maj-73!": "![majsoul: 73](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-73.png)",
            "/maj-74!": "![majsoul: 74](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-74.png)",
            "/maj-75!": "![majsoul: 75](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-75.png)",
            "/maj-76!": "![majsoul: 76](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-76.png)",
            "/maj-77!": "![majsoul: 77](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-77.png)",
            "/maj-78!": "![majsoul: 78](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-78.png)",
            "/maj-79!": "![majsoul: 79](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-79.png)",
            "/maj-80!": "![majsoul: 80](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-80.png)",
            "/maj-81!": "![majsoul: 81](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-81.png)",
            "/maj-82!": "![majsoul: 82](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-82.png)",
            "/maj-83!": "![majsoul: 83](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-83.png)",
            "/maj-84!": "![majsoul: 84](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-84.png)",
            "/maj-85!": "![majsoul: 85](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-85.png)",
            "/maj-86!": "![majsoul: 86](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-86.png)",
            "/maj-87!": "![majsoul: 87](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-87.png)",
            "/maj-88!": "![majsoul: 88](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-88.png)",
            "/maj-89!": "![majsoul: 89](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-89.png)",
            "/maj-90!": "![majsoul: 90](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-90.png)",
            "/maj-91!": "![majsoul: 91](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-91.png)",
            "/maj-92!": "![majsoul: 92](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-92.png)",
            "/maj-93!": "![majsoul: 93](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-93.png)",
            "/maj-94!": "![majsoul: 94](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-94.png)",
            "/maj-95!": "![majsoul: 95](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-95.png)",
            "/maj-96!": "![majsoul: 96](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-96.png)",
            "/maj-97!": "![majsoul: 97](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-97.png)",
            "/maj-98!": "![majsoul: 98](https://cdn.jsdelivr.net/gh/BoringHacker/cdn/emojis/majsoul/maj-98.png)"
        };
        const markdownPalettes = window.markdownPalettes;
        function ShowTip(tip, type) {
            var $tip = $('#tip');
            if ($tip.length == 0) {
                $tip = $('<span id="tip" style="position:fixed; top:50px; left: 50%; z-index:9999; height: 35px; padding: 0 20px; line-height: 35px; background-color: white; border: 5px; opacity: 75%"></span>');
                $('body').append($tip);
            }
            $tip.stop(true).prop('class', 'alert alert-' + type).text(tip).css('margin-left', -$tip.outerWidth() / 2).fadeIn(250).delay(500).fadeOut(250);
        }
        function ShowMsg(msg) {
            ShowTip(msg, 'info');
        }
        function ShowSuccess(msg) {
            ShowTip(msg, 'success');
        }
        function ShowFailure(msg) {
            ShowTip(msg, 'danger');
        }
        function ShowWarn(msg, $focus, clear) {
            ShowTip(msg, 'warning');
            if ($focus) {
                $focus.focus();
                if (clear) $focus.val('');
            }
            return false;
        }
        function getSubString(sourceString = "", findPos = -1) {
            if (findPos == -1) {
                return "zr.tk";
            }
            if (findPos <= 5) {
                return "";
            }
            let resultString = "";
            for (let i = findPos - 5; i < findPos; i++) {
                resultString += sourceString[i];
            }
            return resultString;
        }
        function sliceString(sourceString = "", leftSide = 0, rightSide = 0) {
            let resultString = ""
            for (let i = leftSide; i <= rightSide; i++) {
                resultString += sourceString[i];
            }
            return resultString;
        }
        function replaceString(stringToChange = "") {
            let isChanged = false;
            for (let i in replaceElement) {
                let changedStr = prefix + i + suffix;
                while (getSubString(stringToChange, stringToChange.lastIndexOf(changedStr)) != "zr.tk" && getSubString(stringToChange, stringToChange.lastIndexOf(changedStr)) != "jsoul") {
                    isChanged = true;
                    stringToChange = sliceString(stringToChange, 0, stringToChange.lastIndexOf(changedStr) - 1) + replaceElement[i] + sliceString(stringToChange, stringToChange.lastIndexOf(changedStr) + changedStr.length, stringToChange.length - 1);
                }
            }
            for (let i in userElement) {
                let changedStr = prefix + i + suffix;
                while (getSubString(stringToChange, stringToChange.lastIndexOf(changedStr)) != "zr.tk" && getSubString(stringToChange, stringToChange.lastIndexOf(changedStr)) != "jsoul") {
                    isChanged = true;
                    stringToChange = sliceString(stringToChange, 0, stringToChange.lastIndexOf(changedStr) - 1) + userElement[i] + sliceString(stringToChange, stringToChange.lastIndexOf(changedStr) + changedStr.length, stringToChange.length - 1);
                }
            }
            if (isChanged == true) {
                return stringToChange;
            }
            else {
                return undefined;
            }
        }
        function main() {
            if (functionIsOn == false) {
                return;
            }
            if (typeof markdownPalettes != "undefined") {
                let changedStr = replaceString($(".CodeMirror-wrap textarea").val());
                if (changedStr != undefined) {
                    $(".CodeMirror-wrap textarea").val(changedStr);
                    $(".CodeMirror-wrap textarea").trigger("input");
                }
            }
            if (document.getElementById("feed-content") != null) {
                let changedStr = replaceString(document.getElementById("feed-content").value);
                if (changedStr != undefined) {
                    document.getElementById("feed-content").value = changedStr;
                }
            }
        }
        function replaceAll() {
            if (replaceString(markdownPalettes.content) != undefined) {
                markdownPalettes.content = replaceString(markdownPalettes.content);
                ShowSuccess("文中所有表情已手动替换");
                return;
            }
            else return;
        }
        function readConfig() {
            prefix = window.localStorage.getItem("LuoguEmojiSenderPrefix");
            suffix = window.localStorage.getItem("LuoguEmojiSenderSuffix");
            functionIsOn = JSON.parse(window.localStorage.getItem("LuoguEmojiSenderIsOn"));
            seamlessMode = JSON.parse(window.localStorage.getItem("LuoguEmojiSenderIsSeamless"));
            queryIsOn = JSON.parse(window.localStorage.getItem("LuoguEmojiSenderQueryIsOn"));
            if (seamlessMode == true) {
                prefix = "", suffix = "";
            }
            userElement = JSON.parse(window.localStorage.getItem("LuoguEmojiSenderUserElements"));
        }
        var setting = new Object;
        function init() {
            $(`<li data-v-6d5597b1 id="replaceEmoji">
                <a data-v-6d5597b1="" title="手动替换表情" unselectable="on">
                    <img style="margin: 2px 0; padding: 0; inline-size: 22px; align-items: center; justify-content: center" src="https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/285/grinning-face-with-sweat_1f605.png">
                </a>
            </li>`).appendTo($(".mp-editor-menu"));
            $("#replaceEmoji").on("click", function () {
                replaceAll();
            });

            if (localStorage.getItem("LuoguEmojiSender") == null) {
                ShowSuccess("自动发表情插件初始化完毕");
            }
            else {
                readConfig();
            }
            if (functionIsOn == true) {
                addOnButton();
            }
            else {
                addOffButton();
            }
            document.addEventListener("input", function () {
                main();
            })
            if ((markdownPalettes != undefined || document.getElementById("feed-content") != null) && queryIsOn == true) {
                $(`
                <div id="queryButton" style="margin: 0; padding: 0; position: fixed; width: 100px; height: 32px; right: 0px; bottom: 50vh; color: black; background: white; opacity: 80%;">
                <a href="https://maxmilite.gitee.io/archive/emoji-library.html" target="_blank"><p style="text-align: center; padding: 4px 0; margin: 0; font-size: 16px; user-select:none; color: black">查看表情</p></a>
                </div>
                <div id="switchQuery" style="margin: 0; padding: 0; position: fixed; width: 20px; height: 32px; right: 100px; bottom: 50vh; color: black; background: white; opacity: 80%;">
                    <p style="text-align: center; padding: 4px 4px; margin: 0;font-size: 16px; user-select:none;" id="switchContent">></p>
                </div>
            `).appendTo($("body")[0]);
                $("#switchQuery").on("click", function () {
                    if ($("#queryButton").width() != 0) {
                        $("#queryButton").animate({width: "0px"});
                        $("#switchQuery").animate({right: "0px"});
                        $("#switchContent")[0].innerText = "<";
                    }
                    else {
                        $("#queryButton").animate({width: "100px"});
                        $("#switchQuery").animate({right: "100px"});
                        $("#switchContent")[0].innerText = ">";
                    }
                });
            }
            if (markdownPalettes != undefined || document.getElementById("feed-content") != null) {
                ShowSuccess("自动发表情插件已加载完毕");
            }
        }
        function addOffButton() {
            if (document.getElementById("buttonOff") != null) {
                document.getElementById("buttonOff").remove();
                ShowSuccess("自动替换表情功能已关闭");
            }
            $(`<li data-v-6d5597b1 id="buttonOn">
                <a data-v-6d5597b1="" title="开启自动替换" unselectable="on">
                    关
                </ a>
            </li>`).appendTo($(".mp-editor-menu"));
            $("#buttonOn").on("click", function () {
                addOnButton();
            });
            functionIsOn = false;
            window.localStorage.setItem("LuoguEmojiSenderIsOn", JSON.stringify(functionIsOn));
        }
        function addOnButton() {
            if (document.getElementById("buttonOn") != null) {
                document.getElementById("buttonOn").remove();
                ShowSuccess("自动替换表情功能已开启");
            }
            $(`<li data-v-6d5597b1 id="buttonOff">
                <a data-v-6d5597b1="" title="关闭自动替换" unselectable="on">
                    开
                </a>
            </li>`).appendTo($(".mp-editor-menu"));
            $("#buttonOff").on("click", function () {
                addOffButton();
            });
            functionIsOn = true;
            window.localStorage.setItem("LuoguEmojiSenderIsOn", JSON.stringify(functionIsOn));
        }
        init();
    }, 500);
    //***********************
    //Live2D 二次元动画 作者：刘天佑
    //***********************
	var model_name = window.waifu;
    console.log(`加载模型：chrome-extension://bkomdjmeddfcjiaadecaolblfahccaok/live2d-widget-model-${model_name}/assets/${model_name}.model.json`)
    if(model_name != "none"){
        setTimeout(function(){
            L2Dwidget.init({
                "model": {
                    jsonPath: `chrome-extension://bkomdjmeddfcjiaadecaolblfahccaok/live2d-widget-model-${model_name}/assets/${model_name}.model.json`,
                    "scale": 1
                },
                "display": {
                    "superSample": 2,     // 超采样等级
                    "position": "left",  // 设置上下左右位置
                    "width": 100,
                    "height": 200,
                    "hOffset": 0,
                    "vOffset": 0
                },
                react: {
                    opacity: 1,
                },
                dev: {
                    border: false
                },
                dialog: {
                    enable: true,
                    hitokoto: true
                }
            });
        }, 1000);
    }
} //快速查找：(1) 预加载配置和mdui & jquery (2) Luogu Search AnyWhere (3) 洛谷底部增加插件信息 (4) 洛谷表情管理 (5)老婆
var mainForNoBlog = function(){ //不作用于https://www.luogu.com.cn/blog
    //***********************
    //背景图片修改 作者：刘天佑
    //***********************
    window.back = window.background[Math.floor(Math.random() * window.background.length)];
    setInterval(function(){ //修复：背景图片缺失问题
        //修复：div不存在而错误终止脚本的情况
        document.querySelector('body').style=`background: url(${window.back}) fixed center;background-size: cover;`;
        if(document.querySelector('main[style="background-color: rgb(239, 239, 239);"]') != null)
            document.querySelector('main[style="background-color: rgb(239, 239, 239);"]').style="opacity: 0.9;";
        if(document.querySelector('div[style="background: linear-gradient(90deg, rgb(35, 37, 38), rgb(65, 67, 69)); filter: blur(0px) brightness(100%);"]') != null)
            document.querySelector('div[style="background: linear-gradient(90deg, rgb(35, 37, 38), rgb(65, 67, 69)); filter: blur(0px) brightness(100%);"]').style="opacity: 0.9;";
        if(document.querySelector('div[style="background: rgb(51, 51, 51); filter: blur(0px) brightness(100%);"]') != null)
            document.querySelector('div[style="background: rgb(51, 51, 51); filter: blur(0px) brightness(100%);"]').style="opacity: 0.9;";
        if(document.querySelector('div[class="mdui-panel mdui-panel-gapless"]') != null)
            document.querySelector('div[class="mdui-panel mdui-panel-gapless"]').style="opacity: 0.9;";
        if(document.getElementById('live2dcanvas') != null){
            document.getElementById('live2dcanvas').style="position: fixed; left: 0px; bottom: 0px; z-index: 99999; top: 450px; pointer-events: none;";
        }
    },100);
    //***********************
    //实时私信提示代码逻辑 作者：刘天佑
    //为什么不能实时回复呢？我猜每一个人说话都应该经过深思熟虑吧……
    //***********************
    window.chat_websocket = new WebSocket('wss://ws.luogu.com.cn/ws?host=www.luogu.com.cn');
    window.chat_websocket.onopen = function(evt){
        var blogpage = /\/blog(.*)/;
        window.chat_websocket.send('{"type":"join_channel","channel":"chat","channel_param":"' + window.uid + '","exclusive_key":null}');
        console.log("已经连接到洛谷私信服务器！");
    }
    window.chat_websocket.onerror = function(evt){
        console.warn("无法连接到洛谷私信服务器，请刷新页面再试！");
    }
    window.chat_websocket.onmessage = function(evt){
        //{"_channel":"chat","_channel_param":"206814","_ws_type":"join_result","client_number":2,"result":"success","type":"result","welcome_message":""}
        //{"_channel":"chat","_channel_param":"206814","_ws_type":"heartbeat","client_number":1,"type":"heartbeat"}
        //{"_channel":"chat","_channel_param":"206814","_ws_type":"server_broadcast","message":{"content":"。。。","id":9395711,"receiver":{"background":"https://cdn.luogu.com.cn/upload/image_hosting/mvku5hfx.png","badge":null,"ccfLevel":5,"color":"Green","isAdmin":false,"isBanned":false,"name":"LiuTianyou","slogan":"希望每个人在自己的道路上越走越远……","uid":206814},"sender":{"background":"https://cdn.luogu.com.cn/upload/image_hosting/9nmrc0ym.png","badge":null,"ccfLevel":0,"color":"Green","isAdmin":false,"isBanned":false,"name":"weisumouyingjinpai","slogan":"","uid":578146},"status":1,"time":1657159550}}
        var message = JSON.parse(evt.data);
        //修复：自己发私信会收到提示 & 在私信界面发私信会收到提示
        var Chatpage = /\/chat(.*)/;
        if(message._ws_type != "server_broadcast" || message.message.sender.uid == window.uid || Chatpage.test(window.location.pathname)) return;
        var notice = "收到@" + message.message.sender.name + "的私信：" + message.message.content;
        var div = document.createElement("div");
        div.innerHTML=`
        <div class="swal2-container swal2-top-end swal2-fade swal2-shown" style="overflow-y: auto;">
            <div aria-labelledby="swal2-title" aria-describedby="swal2-content" class="swal2-popup swal2-toast swal2-show" tabindex="-1" role="alert" aria-live="polite" style="display: flex;">
                <div class="swal2-header">
                    <ul class="swal2-progresssteps" style="display: none;"></ul>
            <div class="swal2-icon swal2-info" style="display: flex;">
                <span class="swal2-icon-text">i</span>
                <div class="swal2-success-circular-line-left" style="background-color: rgb(255, 255, 255);"></div>
                <span class="swal2-success-line-tip"></span>
                <span class="swal2-success-line-long"></span>
                <div class="swal2-success-ring"></div>
                <div class="swal2-success-fix" style="background-color: rgb(255, 255, 255);"></div><div class="swal2-success-circular-line-right" style="background-color: rgb(255, 255, 255);"></div>
            </div>
            <h2 class="swal2-title" id="swal2-title"><a href="https://www.luogu.com.cn/chat">${notice}</a></h2>
            <button type="button" class="swal2-close" style="display: flex;" onclick="document.body.removeChild(document.body.lastElementChild)">×</button>
        </div>`;
        document.body.appendChild(div);
        setTimeout(function(){document.body.removeChild(document.body.lastElementChild);}, 5000);
    }
    window.chat_websocket.onclose = function(evt){}
    //***********************
    //实时全网犇犇代码 作者：刘天佑
    //依赖于hack.chat的聊天室
    //***********************
    window.benben_websocket = new WebSocket('wss://hack.chat/chat-ws');
    function randomString(len) {
        len = len || 32;
        var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
        var maxPos = $chars.length;
        var pwd = '';
        for (var i = 0; i < len; i++) {
            pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
        }
        return pwd;
    }
    function cleanName(nick){
        var mode = /(.*)__(.*)/;
        if(!mode.test(nick)) return;
        return mode.exec(nick)[1];
    }
    window.benben_websocket.onopen = function(evt){
        var blogpage = /\/blog(.*)/;
        window.benben_websocket.send('{"cmd":"join","channel":"luogu-benben","nick":"' + window.nickname + "__" + randomString(8) +'"}');
        console.log("已经连接到犇犇服务器！");
        var benben_head = document.getElementById("benben_head");
        var warning = "温馨提示：犇犇用户可以伪造，请不要透露你的密码等信息，不要轻易相信他人的用户名！";
        var msg = document.createElement("tr");
        msg.innerHTML = `
        <tr>
            <td width=150>开发者</td>
            <td width=530>${warning}</td>
        </tr>`;
        benben_head.appendChild(msg);
    }
    window.benben_websocket.onerror = function(evt){
        console.warn("无法连接到犇犇服务器，请刷新页面再试！");
    }
    window.benben_websocket.onmessage = function(evt){
        //{"cmd":"chat","nick":"test","uType":"user","userid":8249820293619,"channel":"luogu-benben","text":"1234","level":100,"time":1657243535295}
        var message = JSON.parse(evt.data);
        if(message.cmd != "chat") return;
        var benben_head = document.getElementById("benben_head");
        var msg = document.createElement("tr");
        msg.innerHTML = `
        <tr>
            <td width=150>${cleanName(message.nick)}</td>
            <td width=530>${message.text}</td>
        </tr>`;
        benben_head.appendChild(msg);
    }
    window.benben_websocket.onclose = function(evt){}
    window.submit_benben = function(){
        var msg = document.getElementById("submit_msg").value;
        window.benben_websocket.send('{"cmd":"chat","text":"' + msg +'"}');
        document.getElementById("submit_msg").value = "";
    }
    var chat_content = document.createElement("div");
    chat_content.innerHTML = `
    <div class="mdui-dialog" id="benben_chat">
        <div class="mdui-dialog-title">犇犇</div>
            <div class="mdui-dialog-content">
            <table class="mdui-table" id="benben_table">
               <thead>
                    <tr>
                        <th width=150 id="benben_name">用户名</th>
                        <th width=530 id="benben_msg">消息</th>
                    </tr>
               </thead>
               <tbody id="benben_head"></tbody>
            </table>
            <iframe width=0 height=0 frameborder=0 id="voidframe" name="voidframe"></iframe>
            <form target="voidframe" onsubmit="window.submit_benben();">
                <div class="mdui-textfield">
                    <textarea class="mdui-textfield-input" type="text" rows="4" placeholder="有什么新鲜事告诉大家……" id="submit_msg"></textarea>
                    <button class="mdui-btn mdui-ripple" type="submit">发射犇犇！</button>
               </div>
           </form>
        </div>
        <div class="mdui-dialog-actions">
            <button class="mdui-btn mdui-ripple" onclick="window.benben_chat.close();">关闭</button>
        </div>
    </div>`;
    document.body.appendChild(chat_content);
    setTimeout(function(){window.benben_chat = new mdui.Dialog("#benben_chat");}, 500); //修复找不到mdui的问题
    var chat = document.createElement("div");
    chat.innerHTML = `
    <button class="mdui-fab mdui-fab-fixed mdui-ripple" style="background-color: white;" id="benben_button" onclick="window.benben_chat.toggle();">
        <i class="mdui-icon material-icons">speaker_notes</i>
    </button>`;
    document.body.appendChild(chat);
    //***********************
    //配置修改器 作者：刘天佑
    //***********************
    window.submit_config = function(){
        if(document.getElementById("config_background").value != ""){
            window.localStorage.setItem("background", document.getElementById("config_background").value);
        }
        if(document.getElementById("config_uid").value != ""){
            window.localStorage.setItem("uid", document.getElementById("config_uid").value);
        }
        if(document.getElementById("config_nickname").value != ""){
            window.localStorage.setItem("nickname", document.getElementById("config_nickname").value);
        }
        if(document.getElementById("config_friends").value != ""){
            window.localStorage.setItem("friends", document.getElementById("config_friends").value);
        }
        if(document.getElementById("config_limit").value != ""){
            window.localStorage.setItem("discussLimit", document.getElementById("config_limit").value);
        }
        window.localStorage.setItem("LuoguEmojiSenderPrefix", document.getElementsByName("prefix")[0].value);
        window.localStorage.setItem("LuoguEmojiSenderSuffix", document.getElementsByName("suffix")[0].value);
        window.localStorage.setItem("LuoguEmojiSenderIsOn", JSON.stringify(true));
        window.localStorage.setItem("LuoguEmojiSenderIsSeamless", document.getElementsByName("seamless")[0].checked);
        window.localStorage.setItem("LuoguEmojiSenderQueryIsOn", document.getElementsByName("query")[0].checked);
        window.localStorage.setItem("LuoguEmojiSenderUserElements", JSON.stringify(JSON.parse(document.getElementById("userElementBox").value), null, 4));
        var waifu = "";
        for(var i = 0; i < document.getElementsByName("waifu").length; i++){
            if(document.getElementsByName("waifu")[i].checked == true){
                waifu = document.getElementsByName("waifu")[i].value;
            }
        }
        window.localStorage.setItem("waifu", waifu);
        setTimeout(function(){
            location.reload();
        },200);
    }
    var configDialog = document.createElement("div");
    configDialog.innerHTML = `
    <form onsubmit="window.submit_config();">
         <div class="mdui-dialog" id="config_dialog">
             <div class="mdui-dialog-title">洛谷强化插件配置修改</div>
             <div class="mdui-dialog-content">
                 <div class="mdui-textfield">
                     <label class="mdui-textfield-label">在此输入你的UID</label>
                     <input class="mdui-textfield-input" type="text" id="config_uid" placeholder="维持原状"/>
                 </div>
                 <div class="mdui-textfield">
                     <label class="mdui-textfield-label">在此输入你的用户名（字母+数字+下划线）</label>
                     <input class="mdui-textfield-input" type="text" id="config_nickname" placeholder="维持原状"/>
                 </div>
                 <div class="mdui-textfield">
                     <label class="mdui-textfield-label">在此输入你的背景图片地址（可用半角逗号隔开，会随机选择图片）</label>
                     <input class="mdui-textfield-input" type="text" id="config_background" placeholder="维持原状"/>
                 </div>
                 <div class="mdui-textfield">
                     <label class="mdui-textfield-label">在此输入你的好友UID（半角逗号隔开，至少输入一个）</label>
                     <input class="mdui-textfield-input" type="text" id="config_friends" placeholder="维持原状"/>
                 </div>
                 <div class="mdui-textfield">
                     <label class="mdui-textfield-label">在此输入你的主页帖子数量（半角逗号隔开，0 ≤ x ≤ 40）</label>
                     <input class="mdui-textfield-input" type="text" id="config_limit" placeholder="维持原状"/>
                 </div>
                 <div class="mdui-textfield">
                     <label class="mdui-textfield-label">请选择你的老婆（？）：</label>
                         <label class="mdui-radio">
                             <input type="radio" name="waifu" value="none"/>
                             <i class="mdui-radio-icon"></i>
                             无
                         </label><br>
                         <label class="mdui-radio">
                             <input type="radio" name="waifu" value="chitose"/>
                             <i class="mdui-radio-icon"></i>
                             学长
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="hibiki"/>
                             <i class="mdui-radio-icon"></i>
                             美少女
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="hijiki"/>
                             <i class="mdui-radio-icon"></i>
                             黑猫
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="izumi"/>
                             <i class="mdui-radio-icon"></i>
                             清纯少女
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="miku"/>
                             <i class="mdui-radio-icon"></i>
                             初音
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="tororo"/>
                             <i class="mdui-radio-icon"></i>
                             白猫
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="tsumiki"/>
                             <i class="mdui-radio-icon"></i>
                             学生服装
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="unitychan"/>
                             <i class="mdui-radio-icon"></i>
                             蜜蜂少女
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="nico"/>
                             <i class="mdui-radio-icon"></i>
                             狐狸萌妹子
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="wanko"/>
                             <i class="mdui-radio-icon"></i>
                             狗狗
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="nipsilon"/>
                             <i class="mdui-radio-icon"></i>
                             长发妹妹
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="nito"/>
                             <i class="mdui-radio-icon"></i>
                             短发萝莉
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="ni-j"/>
                             <i class="mdui-radio-icon"></i>
                             电音女
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="haruto" checked/>
                             <i class="mdui-radio-icon"></i>
                             呆萌短发小护士
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="koharu"/>
                             <i class="mdui-radio-icon"></i>
                             呆萌长发小护士
                        </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value=shizuku"/>
                             <i class="mdui-radio-icon"></i>
                             ac娘
                         </label><br>
                         <label class="mdui-radio">
                         <input type="radio" name="waifu" value="z16"/>
                             <i class="mdui-radio-icon"></i>
                             睡衣女
                         </label><br>
                     </label>
                     温馨提示，请先安装Chrome插件“Live2D相关文件提供”后使用！<br>
                     可以在Chrome扩展中导入不同的模型，并将代码微调之后使用自己的模型。
                 </div>
                 <div id="lesSettingDiv">
                     <p style="text-align: center; font-weight: bold">LuoguEmojiSender 设置</p>
                     <hr>
                     <form name="lesSetting">
                     <strong>无缝模式：</strong>
                     <input type="radio" name="seamless" value="enabled" checked="true">启用</input>
                     <input type="radio" name="seamless" value="disabled">禁用</input>
                     <br>
                     自定义前缀: <input type="text" name="prefix" style="width: 100px; text-align: center">
                     <br>
                     自定义后缀: <input type="text" name="suffix" style="width: 100px; text-align: center">
                     <br>
                     <strong>查表情按钮： </strong>
                         <input type="radio" name="query" value="enabled" >启用</input>
                         <input type="radio" name="query" value="disabled" checked="true">禁用</input>
                         <br>
                     用户定义表情：<br>
                         <textarea style="height: 200px; font-size: 12px; width: 218.59px; padding: 10px" id="userElementBox"></textarea>
                         <p style="text-align: center; color: red; user-select:none;" id=resetPlugin>点击重置 LuoguEmojiSender</p>
                    </form>
             </div>
             </div>
             <div class="mdui-dialog-actions">
                 <button class="mdui-btn mdui-ripple" type="submit" onclick="window.configDialog.close();">保存</button>
                 <button class="mdui-btn mdui-ripple" onclick="window.configDialog.close();">取消</button>
             </div>
         </div>
    </form>`;
    document.body.appendChild(configDialog);
    document.getElementById("userElementBox").value = `
    {
        "样例1": "XXX1.com",
        "样例2": "XXX2.com",
        "样例3": "XXX3.com",
        "样例4": "XXX4.com"
    }`;
    document.getElementsByName("prefix")[0].value = "{";
    document.getElementsByName("suffix")[0].value = "}";
    setTimeout(function(){
        $("#resetPlugin").on("click", function () {
            if (prompt("您确定要重置 LuoguEmojiSender 设置吗？如果确定，请在下面的输入框里输入 “确定” 两个汉字：") == "确定") {
                localStorage.removeItem("LuoguEmojiSender");
                alert("重置完成")
                location.reload();
            }
        });
    }, 1000);
    setTimeout(function(){window.configDialog = new mdui.Dialog("#config_dialog");}, 500); //修复找不到mdui的问题
    var config_button = document.createElement("div");
    config_button.innerHTML = `
    <button class="mdui-fab mdui-fab-fixed mdui-ripple" style="background-color: white; top: 420px" id="config_button" onclick="window.configDialog.toggle();">
        <i class="mdui-icon material-icons">settings</i>
    </button>`;
    document.body.appendChild(config_button);
    setTimeout(function(){
        if(window.localStorage.getItem("configed") == null){
            window.configDialog.open();
            window.localStorage.setItem("configed", "1");
        }
    }, 250);
} //快速查找：(1) 背景图片修改 (2) 实时私信提醒 (3) 伪全网犇犇 (4) 配置修改器
var mainForUserPage = function(){ //作用于https://www.luogu.com.cn/user/*
    //***********************
    //练习页面题号加颜色功能，作者rainy
    //代码来自于https://greasyfork.org/zh-CN/scripts/392036-%E6%B4%9B%E8%B0%B7%E9%A2%98%E7%9B%AE%E9%9A%BE%E5%BA%A6%E6%98%BE%E7%A4%BA-luogu-dif-render/code
    //***********************
    setInterval(() => {
        var problems = document.getElementsByTagName('a');
        var problems_color = [];
        var colors = ['rgb(191, 191, 191)', 'rgb(254, 76, 97)', 'rgb(243, 156, 17)', 'rgb(255, 193, 22)', 'rgb(82, 196, 26)', 'rgb(52, 152, 219)', 'rgb(157, 61, 207)', 'rgb(14, 29, 105)'];
        for(var passed of window._feInjection.currentData.passedProblems) problems_color.push({pid: passed.pid, dif: passed.difficulty, rendered: false});
        for(var tryed of window._feInjection.currentData.submittedProblems) problems_color.push({pid: tryed.pid, dif: tryed.difficulty, rendered: false});
        for(var i = 0; i < problems.length; i++){
            var number = problems[i].innerText;
            for(var j = 0; j < problems_color.length; j++){
                if(problems_color[j].pid == number){
                    problems[i].style.color = colors[problems_color[j].dif];
                }
            }
        }
    }, 1000);
    //***********************
    //显示他人估值 作者：叶ID (KMnO4y_Fish, yezhiyi9670)
    //代码来自于https://greasyfork.org/zh-CN/scripts/390180-%E6%B4%9B%E8%B0%B7%E6%98%BE%E7%A4%BA%E4%BB%96%E4%BA%BA%E5%92%95%E5%80%BC/code
    //**********************
    setTimeout(function(){
        setInterval(function() {
            if($('.add-rating-inspector').length) return
            var $sidebar = $('section.side');
            var $firstele = $($sidebar.children()[1]);
            var $setting = $('.btn.btn-config.lfe-form-sz-middle');
            if($setting.length) return;
            var $rankbox = $('.stats.normal :nth-child(5) :nth-child(2)');
            if(!$rankbox.length) return;
            console.log($rankbox);
            var $show_ele = $(`
            <div data-v-f9624136 data-v-11e78d6a class="card padding-default add-rating-inspector" data-v-6febb0e8>
              <h3 class="lfe-h3"><svg aria-hidden="true" focusable="false" data-prefix="fad" data-icon="dice-d6" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" class="svg-inline--fa fa-dice-d6 fa-w-14" style="color: rgb(52, 152, 219);"><g data-v-d4260d54="" data-v-796309f8="" class="fa-group"><path data-v-d4260d54="" data-v-796309f8="" fill="currentColor" d="M25.87 124.42a8.54 8.54 0 0 1-.06-14.42l166-100.88a61.72 61.72 0 0 1 64.43 0L422.19 110a8.54 8.54 0 0 1-.05 14.47L224 242.55z" class="fa-secondary"></path><path data-v-d4260d54="" data-v-796309f8="" fill="currentColor" d="M0 161.83v197.7c0 23.77 12.11 45.74 31.79 57.7L184 509.71c10.67 6.48 24.05-1.54 24.05-14.44V271.46L12 154.58c-5.36-3.17-12 .85-12 7.25zm436-7.25L240 271.46v223.82c0 12.89 13.39 20.92 24.05 14.43l152.16-92.48c19.68-12 31.79-33.94 31.79-57.7v-197.7c0-6.41-6.64-10.42-12-7.25z" class="fa-primary"></path></g></svg>
                &nbsp;
                咕值
              </h3>
              <p id="add-rating-error" style="display:none;margin-bottom:0;">该用户排名大于1000，不能获取其咕值详情。</p>
              <button data-v-dc8d06e8="" data-v-4929b25c="" data-v-796309f8="" solid="" class="btn" id="add-rating-button" style="border-color: rgb(255, 255, 255); color: rgb(255, 255, 255); background-color: rgb(52, 152, 219);margin-top:16px;padding:4px 10px;" visibility: hidden>显示</button>
              <div id="add-rating-showbox">
                <div data-v-d4260d54="" data-v-796309f8="" class="flex-lr info-row" style="margin-bottom: 0.5em;">
                  <span data-v-d4260d54="" data-v-796309f8="">基础信用</span>
                  <span data-v-d4260d54="" data-v-796309f8="" class="info-content add-rating-basic">-</span>
                </div>
                <div data-v-d4260d54="" data-v-796309f8="" class="flex-lr info-row" style="margin-bottom: 0.5em;">
                  <span data-v-d4260d54="" data-v-796309f8="">练习情况</span>
                  <span data-v-d4260d54="" data-v-796309f8="" class="info-content add-rating-practice">-</span>
                </div>
                <div data-v-d4260d54="" data-v-796309f8="" class="flex-lr info-row" style="margin-bottom: 0.5em;">
                  <span data-v-d4260d54="" data-v-796309f8="">社区贡献</span>
                  <span data-v-d4260d54="" data-v-796309f8="" class="info-content add-rating-community">-</span>
                </div>
                <div data-v-d4260d54="" data-v-796309f8="" class="flex-lr info-row" style="margin-bottom: 0.5em;">
                  <span data-v-d4260d54="" data-v-796309f8="">比赛情况</span>
                  <span data-v-d4260d54="" data-v-796309f8="" class="info-content add-rating-contest">-</span>
                </div>
                <div data-v-d4260d54="" data-v-796309f8="" class="flex-lr info-row" style="margin-bottom: 0.5em;">
                  <span data-v-d4260d54="" data-v-796309f8="">获得成就</span>
                  <span data-v-d4260d54="" data-v-796309f8="" class="info-content add-rating-achievement">-</span>
                </div>
                <div data-v-d4260d54="" data-v-796309f8="" class="flex-lr info-row" style="margin-bottom: 0.5em;">
                  <span data-v-d4260d54="" data-v-796309f8="">总咕值</span>
                  <span data-v-d4260d54="" data-v-796309f8="" class="info-content add-rating-total">-</span>
                </div>
                <div data-v-d4260d54="" data-v-796309f8="" class="flex-lr info-row" style="margin-bottom: 0.5em;">
                  <span data-v-d4260d54="" data-v-796309f8="">更新日期</span>
                  <span data-v-d4260d54="" data-v-796309f8="" class="info-content add-rating-date">-</span>
                </div>
              </div>
            </div>
            <style>
              .info-content[data-v-d4260d54][data-v-796309f8] {
                color: rgba(0, 0, 0, 0.45);
                float: right;
              }
            </style>`);
            $show_ele.insertAfter($firstele);
            var ranktxt = $rankbox.html().trim();
            var show_result = function(res, date) {
                $('.add-rating-basic').html(res['basicRating']);
                $('.add-rating-practice').html(res['practiceRating']);
                $('.add-rating-community').html(res['socialRating']);
                $('.add-rating-contest').html(res['contestRating']);
                $('.add-rating-achievement').html(res['prizeRating']);
                $('.add-rating-total').html(res['rating']);
                $('.add-rating-date').html(date);
            }
            var another_show_func = function() {
            };
            var show_error = function(str) {
                $('#add-rating-error').css('display','block');
                $('#add-rating-error').html(str);
                $('#add-rating-button')[0].removeAttribute('disabled');
            };
            if(ranktxt.indexOf("k")!=-1 || ranktxt > 1000) {
                $('#add-rating-error').css('display','block');
                $('#add-rating-button').click(another_show_func);
                $('#add-rating-button').css('display','none');
            }
            else if(ranktxt.indexOf("-")!=-1) {
                $('#add-rating-error').css('display','block');
                $('#add-rating-error').html('用户没有排名，不能获取其咕值详情。');
                $('#add-rating-button').click(another_show_func);
                $('#add-rating-button').css('display','none');
            }
            else {
                var tt_user_rk = ranktxt;
                var tt_rk_page = Math.floor((tt_user_rk-1)/50) + 1;
                var tt_username = location.href.match(/^(\w+):\/\/www.luogu.com.cn\/user\/(\d+)/)[2];
                var akioi = function(pageid,remain = 10){
                    if(remain == 0 || pageid>20) {
                        if(pageid<=20) show_error("找不到用户的咕值信息，请刷新重试。");
                        else show_error("找不到用户的咕值信息。");
                        return;
                    }
                    $('#add-rating-button')[0].setAttribute('disabled','disabled');
                    var url = "https://www.luogu.com.cn/ranking?page="+pageid+"&_contentOnly=1";
                    $.get(url,
                          function (data) {
                        var arr = data;
                        console.log("用户数据：",arr);
                        if (arr['code'] != 200) {
                            show_error(arr["message"]);
                        }
                        else {
                            var dat = arr['currentData']['rankList']['result'];
                            for(var i = 0;i < 50;i++) {
                                if(!dat[i]) continue;
                                if(dat[i]['user']['uid'] == tt_username) {
                                    $('#add-rating-button').css("display",'none');
                                    function getdate(t) {
                                        var now = new Date(t),
                                            y = now.getFullYear(),
                                            m = now.getMonth() + 1,
                                            d = now.getDate();
                                        return y + "/" + (m < 10 ? "0" + m : m) + "/" + (d < 10 ? "0" + d : d);
                                    }
                                    show_result(dat[i],getdate(dat[i]['calculateTime']*1000));
                                    $('#add-rating-showbox').css('display','block');
                                    return;
                                }
                            }
                            akioi(pageid+1,remain-1);
                        }
                    }
                         );
                };
                $('#add-rating-button').click(function(){akioi(tt_rk_page,10);});
            }
            document.getElementById("add-rating-button").click();
        },200);
    },800);
} //快速查找：(1) 练习页面题号加颜色 (2) 显示他人估值
var mainForHomePage = function(){ //作用于https://www.luogu.com.cn/
    //***********************
    //按难度随机跳题，作者叶ID (KMnO4y_Fish, yezhiyi9670)
    //代码来自于https://greasyfork.org/zh-CN/scripts/390181-%E6%B4%9B%E8%B0%B7%E6%8C%89%E9%9A%BE%E5%BA%A6%E9%9A%8F%E6%9C%BA%E8%B7%B3%E9%A2%98/code
    //***********************
    setTimeout(function () {
        document.querySelector('div[class="am-u-md-3"]').innerHTML = `
        <div class="lg-article" id="rand-problem-form">
        <h2>随机跳题</h2>
        <select class="am-form-field" style="background-color:#DDD;" name="rand-problem-rating" autocomplete="off" placeholder="选择难度">
          <option value="0">暂无评定</option>
          <option value="1">入门</option>
          <option value="2">普及-</option>
          <option value="3">普及/提高-</option>
          <option value="4">普及+/提高</option>
          <option selected value="5">提高+/省选-</option>
          <option value="6">省选/NOI-</option>
          <option value="7">NOI/NOI+/CTSC</option>
        </select>
        <select class="am-form-field" style="background-color:#DDD;margin-top:16px;" name="rand-problem-source" autocomplete="off" placeholder="选择来源">
          <option selected value="P">洛谷题库</option>
          <option value="CF">CodeForces</option>
          <option value="SP">SPOJ</option>
          <option value="AT">AtCoder</option>
          <option value="UVA">UVa</option>
        </select>
        <button class="am-btn am-btn-sm am-btn-primary" style="margin-top:16px;visibility:hidden">跳转</button>
        <button class="am-btn am-btn-sm am-btn-primary lg-right" id="rand-problem-button" style="margin-top:16px;">跳转</button>
      </div>`;
        $('#rand-problem-button').click(function() {
            $('#rand-problem-button').addClass('am-disabled');
            $.get("https://www.luogu.com.cn/problem/list?difficulty=" + $('[name=rand-problem-rating]')[0].value + "&type=" + $('[name=rand-problem-source]')[0].value + "&page=1&_contentOnly=1",
                  function (data) {
                var arr = data;
                if (arr['code'] != 200) {
                    $('#rand-problem-button').removeClass('am-disabled');
                    show_alert("好像哪里有点问题", arr["message"]);
                }
                else {
                    var problem_count = arr['currentData']['problems']['count'];
                    var page_count = Math.ceil(problem_count / 50);
                    var rand_page = Math.floor(Math.random()*page_count) + 1;
                    $.get("https://www.luogu.com.cn/problem/list?difficulty=" + $('[name=rand-problem-rating]')[0].value + "&type=" + $('[name=rand-problem-source]')[0].value + "&page=" + rand_page + "&_contentOnly=1",
                          function(data) {
                        var list = data['currentData']['problems']['result'];
                        var rand_idx = Math.floor(Math.random()*list.length);
                        var pid = list[rand_idx]['pid'];
                        location.href = "https://www.luogu.com.cn/problem/" + pid;
                    }
                         );
                }
            }
                 );
        });
    },500);
    //***********************
    //筛选主页帖子 作者：刘天佑
    //***********************
    setTimeout(function () {
        var delta = parseInt(window.discussLimit) - 16;
        var posts = document.querySelectorAll('div[class="lg-article"]')[5];
        if(delta < 0){
            delta = -delta;
            var begin = posts.children.length - delta, end = posts.children.length - 1;
            for(var h = begin; h <= end; h++){
                posts.removeChild(posts.lastElementChild);
            }
        }else if(delta > 0){
            var doc = new DOMParser;
            window.new_posts = new Array();
            var top_number = 0, top_mode = /(.*)置顶(.*)/;
            for(var c = 1; c < posts.children.length; c++){
                if(top_mode.test(posts.children[c].innerHTML)){
                    top_number++;
                }
            }
            var no_top = 16 - top_number;
            for(var page = 1; page <= 3; page++){
                var url = "https://www.luogu.com.cn/discuss/lists?forumname=&page=" + page;
                $.ajax({
                    url: url,
                    type: "GET",
                    success: function(data){
                        var dom = doc.parseFromString(data, "text/html");
                        var target = dom.querySelectorAll('div[class="am-g lg-table-bg0 lg-table-row"]');
                        for(var t = 0; t < target.length; t++){
                            if(top_mode.test(target[t].innerHTML)){
                                continue;
                            }
                            window.new_posts.push(target[t].innerHTML);
                        }
                    }
                });
            }
            setTimeout(function(){
                for(var d = no_top; d < no_top + delta; d++){
                    //var mode = /(.*)<div class="am-u-md-3">                            <div class="lg-inline-up"><a href="(.*)" class="center">    <img src="(.*)" class="am-comment-avatar">    <\/a><\/div>                            <div class="lg-inline-up">                                <span class="lg-small">(.*)<\/span><br>                                (.*)                                <span class="lg-small">(.*)个回复<\/span>                            <\/div>                        <\/div>                        <div class="am-u-md-6">                            <a data-pjax="" href="(.*)">(.*)<\/a><br>                            <span class="lg-small">In                            <a data-pjax="" href="(.*)">(.*)<\/a>                        @(.*)<\/span>                        <\/div>                        <div class="am-u-md-3">                                                            <span class="lg-small">最新回复：(.*)<\/span><br>                                <span class="lg-small">@(.*)<\/span>                                                    <\/div>(.*)/;
                    var mode=/(.*)<div class="am-u-md-3">                            <div class="lg-inline-up"><a href="(.*)" class="center">    <img src="(.*)" class="am-comment-avatar">    <\/a><\/div>                            <div class="lg-inline-up">                                (.*)<br>                                                                <span class="lg-small">(.*)个回复<\/span>                            <\/div>                        <\/div>                        <div class="am-u-md-6">                            <a data-pjax="" href="(.*)">(.*)<\/a><br>                            <span class="lg-small">In                            <a data-pjax="" href="(.*)">(.*)<\/a>                        @(.*)<\/span>                        <\/div>                        <div class="am-u-md-3">                            (.*)                       <\/div>(.*)/;
                    var information = mode.exec(window.new_posts[d].replace(/\n/g, ""));
                    /*
                    <section class="am-panel lg-index-contest am-panel-primary">
                    <div class="am-panel-bd">
                        <div class="lg-inline-up"><a href="/user/705879" class="center">
    <img src="https://cdn.luogu.com.cn/upload/usericon/705879.png" class="am-comment-avatar">
    </a></div>
                        <div class="lg-inline-up">
                            <a data-pjax="" href="/discuss/show?postid=455719">
                                某个蒟蒻编译错误
                            </a>
                            <br>
                            <span class="lg-small"><a class="lg-fg-bluelight" href="/user/705879" target="_blank">him0715</a></span>
                            <span class="lg-small">In
                    <a href="/discuss/lists?forumname=P2788">
                        P2788 数学1（math…
                    </a><br>
                    @ 07-10 09:18
                    <span class="lg-small">3回复</span>
                                            </span>
                        </div>
                    </div>
                </section>
                    正则后的数组：
                    0: "                        <div class="am-u-md-3">                            <div class="lg-inline-up"><a href="/user/677152" class="center">    <img src="https://cdn.luogu.com.cn/upload/usericon/677152.png" class="am-comment-avatar">    </a></div>                            <div class="lg-inline-up">                                <span class="lg-small"><a class="lg-fg-green" href="/user/677152" target="_blank">Ricardo_Sakura</a></span><br>                                                                <span class="lg-small">2个回复</span>                            </div>                        </div>                        <div class="am-u-md-6">                            <a data-pjax="" href="/discuss/show?postid=455649">请求大佬帮忙！</a><br>                            <span class="lg-small">In                            <a data-pjax="" href="/discuss/lists?forumname=P8115">P8115 「RdOI R3.5」Table</a>                        @2022-07-09 22:07</span>                        </div>                        <div class="am-u-md-3">                                                            <span class="lg-small">最新回复：<a class="lg-fg-green" href="/user/677152" target="_blank">Ricardo_Sakura</a></span><br>                                <span class="lg-small">@2022-07-09 22:08</span>                                                    </div>                    "
                    1: "                        "
                    2: "/user/677152"
                    3: "https://cdn.luogu.com.cn/upload/usericon/677152.png"
                    4: "<span class="lg-small"><a class="lg-fg-green" href="/user/677152" target="_blank">Ricardo_Sakura</a></span>"
                    5: "2"
                    6: "/discuss/show?postid=455649"
                    7: "请求大佬帮忙！"
                    8: "/discuss/lists?forumname=P8115"
                    9: "P8115 「RdOI R3.5」Table"
                    10: "2022-07-09 22:07"
                    11: "                                <span class="lg-small">最新回复：<a class="lg-fg-green" href="/user/677152" target="_blank">Ricardo_Sakura</a></span><br>                                <span class="lg-small">@2022-07-09 22:08</span>                             "
                    12: "                                    "
                    */
                    var np = document.createElement("section");
                    if(information == null){
                        continue;
                    }
                    if(information[7].length > 15){
                        information[7] = information[7].substr(0, 15) + "...";
                    }
                    if(information[9].length > 14){
                        information[9] = information[9].substr(0, 14) + "...";
                    }
                    np.innerHTML=`
                         <div class="am-panel-bd">
                             <div class="lg-inline-up">
                                 <a href="${information[2]}" class="center">
                                     <img src="${information[3]}" class="am-comment-avatar">
                                 </a>
                             </div>
                             <div class="lg-inline-up">
                                 <a data-pjax="" href="${information[6]}">${information[7]}</a><br>
                                 <span class="lg-small">
                                     ${information[4]}
                                 </span>
                                 <span class="lg-small">In
                                     <a href="${information[8]}">${information[9]}</a><br>
                                     @ ${information[10].substr(5)}
                                 </span>
                            </div>
                        </div>`;
                    posts.appendChild(np);
                    np.className = 'am-panel lg-index-contest am-panel-primary';
                }
            }, 600);
        }
    }, 500);
} //快速查找：(1) 按难度随机跳题 (2)筛选主页帖子
var mainForProblem = function(){ //作用于https://www.luogu.com.cn/problem/*
    //***********************
    //做题显示好友排行 作者：刘天佑
    //***********************
    setTimeout(function(){
        var sidebar = document.querySelector('section[data-v-0cd59e64][data-v-6febb0e8][class="side"]');
        var rank = document.createElement("div");
        rank.innerHTML = `
        <div data-v-f9624136="" data-v-766cabba="" class="card padding-default" data-v-6febb0e8="">
            <h3 data-v-766cabba="" data-v-f9624136="" class="lfe-h3">好友排行</h3>
            <table class="mdui-table">
                <thead>
                    <tr>
                        <th width=200px>好友</th>
                        <th width=300px>得分</th>
                    </tr>
                </thead>
                <tbody id="rank_insert">
                </tbody>
            </table>
        </div>`
        sidebar.appendChild(rank);
        var rank_insert = document.getElementById("rank_insert");
        var users = new Array();
        var scores = new Array();
        var getName = function(uid, index){
            const getCCFLevel = (x) => {  //代码引自Luogu Search Anywhere
                if(x == null || x < 3)
                    return "";
                var color = "";
                if(x <= 5)
                    color = "#5eb95e";
                else if(x <= 7)
                    color = "#07a2f1";
                else
                    color = "#f1c40f";
                return `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 16 16" style="margin: 0px 3px;" fill="${color}" style="margin-bottom: -3px;"><path d="M16 8C16 6.84375 15.25 5.84375 14.1875 5.4375C14.6562 4.4375 14.4688 3.1875 13.6562 2.34375C12.8125 1.53125 11.5625 1.34375 10.5625 1.8125C10.1562 0.75 9.15625 0 8 0C6.8125 0 5.8125 0.75 5.40625 1.8125C4.40625 1.34375 3.15625 1.53125 2.34375 2.34375C1.5 3.1875 1.3125 4.4375 1.78125 5.4375C0.71875 5.84375 0 6.84375 0 8C0 9.1875 0.71875 10.1875 1.78125 10.5938C1.3125 11.5938 1.5 12.8438 2.34375 13.6562C3.15625 14.5 4.40625 14.6875 5.40625 14.2188C5.8125 15.2812 6.8125 16 8 16C9.15625 16 10.1562 15.2812 10.5625 14.2188C11.5938 14.6875 12.8125 14.5 13.6562 13.6562C14.4688 12.8438 14.6562 11.5938 14.1875 10.5938C15.25 10.1875 16 9.1875 16 8ZM11.4688 6.625L7.375 10.6875C7.21875 10.8438 7 10.8125 6.875 10.6875L4.5 8.3125C4.375 8.1875 4.375 7.96875 4.5 7.8125L5.3125 7C5.46875 6.875 5.6875 6.875 5.8125 7.03125L7.125 8.34375L10.1562 5.34375C10.3125 5.1875 10.5312 5.1875 10.6562 5.34375L11.4688 6.15625C11.5938 6.28125 11.5938 6.5 11.4688 6.625Z"></path></svg>`
            }
            $.ajax({
                url: `/api/user/search?keyword=${uid}`,
                type: 'GET',
                success: function(json){
                    json = json.users;
                    if(json.length != 0 && json[0] != null){
                        json.forEach((item) => {
                            if(item == null){
                                return;
                            }
                            if(item.color == "Cheater"){
                                item.badge = "作弊者";
                            }
                            users[index] = `
                            <a class="searchCard searchUserCard" href='https://www.luogu.com.cn/user/${item.uid}'>
                            <div class="searchUserCardBody">
                                <div class="searchUserCardImg" style="background: url(https://cdn.luogu.com.cn/upload/usericon/${item.uid}.png); background-size: 36px 36px;"></div>
                                <div class="searchUserCardInfo"><div style='display: flex; flex-direction: row'><span class="user${item.color}" style="line-height: 20px">${item.name}</span>${getCCFLevel(item.ccfLevel)}${item.badge != null && item.badge != "" ? `<div class='userBadgeInfo badge${item.color}'>${item.badge}</div>` : ""}</div></div>
                            </div>
                        </a>`
                        });
                    }
                }
            });
        }
        var getScore = function(uid, index){
            var mode = /\/problem\/(.*)/;
            var problem = mode.exec(window.location.pathname)[1];
            var Score = 0;
            var ScoreStyle = function(Score){
                if(Score == -1) return "暂无数据";
                if(Score >= 0 && Score < 30){
                    return '<span data-v-11efea91="" data-v-303bbf52="" style="font-weight: bold; color: rgb(231, 76, 60);">' + Score + '</span>';
                }else if(Score >= 30 && Score < 60){
                    return '<span data-v-11efea91="" data-v-303bbf52="" style="font-weight: bold; color: rgb(243, 156, 17);">' + Score + '</span>';
                }else if(Score >= 60 && Score < 80){
                    return '<span data-v-11efea91="" data-v-303bbf52="" style="font-weight: bold; color: rgb(250, 219, 20);">' + Score + '</span>';
                }else if(Score < 100){
                    return '<span data-v-11efea91="" data-v-303bbf52="" style="font-weight: bold; color: rgb(82, 196, 26);">' + Score + '</span>';
                }else{
                    return '<span data-v-43a42535="" data-v-766cabba="" class="lfe-caption tag" style="background: rgb(82, 196, 26); color: rgb(255, 255, 255);">Accepted</span>';
                }
            }
            $.ajax({
                url: "https://www.luogu.com.cn/record/list?pid=" + problem + "&user=" + uid + "&page=1",
                type: 'GET',
                success: function(data){
                    var regex = /(.*)JSON.parse\(decodeURIComponent\("(.*)"\)\)(.*)/;
                    var query = regex.exec(data)[2];
                    var result = JSON.parse(decodeURIComponent(query));
                    if(result.currentData.records.count == 0){
                        scores[index] = ScoreStyle(-1);
                        return;
                    }
                    if(result.currentData.records.result[0].score == undefined){
                        for(var i = 0; i < result.currentData.records.count; i++){
                            if(result.currentData.records.result[0].status == 12){
                                scores[index] = ScoreStyle(100);
                                return;
                            }
                        }
                        scores[index] = ScoreStyle(0);
                        return;
                    }
                    var records = result.currentData.records.result;
                    records.sort(function(a, b){
                        return b.score - a.score;
                    });
                    scores[index] = ScoreStyle(records[0].score);
                }
            });
        }
        for(var i = 0; i < window.friends.length; i++){
            getName(window.friends[i], i);
            getScore(window.friends[i], i);
        }
        setTimeout(function(){
            for(var m = 0; m < window.friends.length; m++){
                var friend_name = users[m];
                var score = scores[m];
                var new_row = document.createElement("tr");
                new_row.innerHTML = `
                <tr>
                    <td width=200px>${friend_name}</td>
                    <td width=300px>${score}</td>
                </tr>`;
                rank_insert.appendChild(new_row);
            }
        }, 1000);
    }, 200);
    //***********************
    //广告去除 作者：刘天佑
    //***********************
    setInterval(function(){
        if(document.querySelector("div[data-v-0a593618]") != null){
            document.querySelector("div[data-v-0a593618]").remove();
        }
    },500);
} //快速查找：(1) 做题显示好友排行 (2) 去广告
var mainForDiscuss = function(){
    //***********************
    //洛谷帖子加转到洛谷帖子保存器 作者：刘天佑
    //***********************
    var summary = document.querySelector('section[class="am-panel am-panel-default lg-summary"]').children[1];
    var save = document.createElement("a");
    save.className = "am-btn am-btn-primary am-btn-sm";
    save.href = "http://lglg.top/show.php?url=" + window.location.href;
    save.innerText = "洛谷帖子保存站";
    summary.appendChild(save);

} //快速查找：(1) 洛谷帖子加转到洛谷帖子保存器

//主入口
window.onload = function(){
    'use strict';
    mainForAll();
    var BlogPage = /\/blog\/(.*)/, UserPage = /\/user\/(.*)/, ProblemPage = /\/problem\/(.*)/, DiscussPage = /\/discuss\/(.*)/, ListPage = /(.*)list(.*)/;
    if(!BlogPage.test(window.location.pathname)){
        mainForNoBlog();
    }
    if(UserPage.test(window.location.pathname)){
        mainForUserPage();
    }
    if(window.location.pathname == "/"){
        mainForHomePage();
    }
    if(ProblemPage.test(window.location.pathname)){
        mainForProblem();
    }
    if(DiscussPage.test(window.location.pathname) && !ListPage.test(window.location.pathname)){
        mainForDiscuss();
    }
};